/* PORTFOLIO PAGE — original inline CSS */
/* ══════════════════════════════════════════════════════════ */
/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--r-lg);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ============================================ */
/* ============================================ */
/* FILTER BAR                               */
/* ============================================ */
/* ============================================ */
.filter-wrap {
  padding: 2.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  transition: all 0.25s var(--ease);
  letter-spacing: 0.02em;
}
.filter-btn:hover {
  border-color: var(--border-2);
  color: var(--text);
  background: var(--bg-3);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(43, 102, 230, 0.35);
}
.filter-count {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--r-full);
  padding: 0.05rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
}
.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ── PORTFOLIO GRID (masonry-ish bento) ──────────────────── */
.portfolio-section {
  padding: 2rem 0 5rem;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
/* First card spans 2 cols — hero treatment */
.p-card:first-child {
  grid-column: span 2;
}

.p-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s,
    box-shadow 0.35s;
  opacity: 1;
  transform: scale(1);
}
.p-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(43, 102, 230, 0.4);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 40px var(--accent-glow);
}
.p-card.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* ============================================ */
/* ============================================ */
/* ============================================ */
/* IMAGE CONTAINER                          */
/* ============================================ */
/* ============================================ */
/* ============================================ */
.p-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
/* ============================================ */
/* ============================================ */
/* ============================================ */
/* HERO CARD TALLER                         */
/* ============================================ */
/* ============================================ */
/* ============================================ */
.p-card:first-child .p-img {
  aspect-ratio: 21/9;
}

.p-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
  display: block;
}
.p-card:hover .p-img img {
  transform: scale(1.07);
}

/* ============================================ */
/* ============================================ */
/* ============================================ */
/* GRADIENT OVERLAY ALWAYS VISIBLE AT BOTTOM*/
/* ============================================ */
/* ============================================ */
/* ============================================ */
.p-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 12, 16, 0.9) 0%,
    rgba(10, 12, 16, 0.3) 50%,
    transparent 100%
  );
  pointer-events: none;
}

/* Hover overlay — visit site */
.p-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 16, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 3;
}
.p-card:hover .p-hover-overlay {
  opacity: 1;
}
.p-overlay-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  color: #0a0c10;
  padding: 0.65rem 1.35rem;
  border-radius: var(--r-full);
  font-weight: 800;
  font-size: 0.875rem;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.35s var(--ease) 0.05s;
}
.p-card:hover .p-overlay-pill {
  transform: translateY(0);
  opacity: 1;
}

/* Category pill — top left of image */
.p-cat-pill {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 4;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-full);
  backdrop-filter: blur(8px);
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  pointer-events: none;
}

/* Stats strip inside image — bottom */
.p-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  pointer-events: none;
}
.p-stat {
  display: flex;
  flex-direction: column;
  background: rgba(10, 12, 16, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  padding: 0.35rem 0.7rem;
  min-width: 60px;
}
.p-stat-val {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.p-stat-lbl {
  font-size: 0.62rem;
  color: var(--text-2);
  margin-top: 0.1rem;
  line-height: 1.2;
}

/* ============================================ */
/* ============================================ */
/* ============================================ */
/* CARD FOOTER                              */
/* ============================================ */
/* ============================================ */
/* ============================================ */
.p-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  gap: 1rem;
}
.p-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.p-sub {
  font-size: 0.78rem;
  color: var(--text-3);
}
.p-detail-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1.5px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 0.8rem;
  transition: all 0.25s;
  cursor: pointer;
}
.p-detail-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ============================================ */
/* MODALS */
/* ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease);
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s var(--bounce);
  position: relative;
}
.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  display: block;
}

.modal-body {
  padding: 1.75rem 2rem 2rem;
}

.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.modal-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(43, 102, 230, 0.1);
  border: 1px solid rgba(43, 102, 230, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-full);
  display: inline-block;
  margin-bottom: 0.5rem;
}
.modal-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  margin-top: 0.25rem;
}
.modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.modal-desc {
  font-size: 0.925rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.modal-stat {
  flex: 1;
  min-width: 100px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem;
  text-align: center;
}
.modal-stat-val {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.modal-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 0.3rem;
}

.modal-quote {
  background: rgba(43, 102, 230, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.6;
}
.modal-quote cite {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-3);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.modal-visit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.25s;
}
.modal-visit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(43, 102, 230, 0.4);
}
.modal-enquire {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.25s;
  background: transparent;
}
.modal-enquire:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================ */
/* STATS BAR */
/* ============================================ */
.stats-bar {
  padding: 3rem 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 1rem;
}
.stats-inner {
  display: flex;
  justify-content: center;
  gap: 5rem;
  flex-wrap: wrap;
}
.si {
  text-align: center;
}
.si-val {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.si-lbl {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-top: 0.35rem;
}

/* ============================================ */
/* ============================================ */
/* TESTIMONIALS                             */
/* ============================================ */
/* ============================================ */
.testi-section {
  padding: 5rem 0;
}
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.testi-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}
.testi-card:hover {
  transform: translateY(-4px);
}
.testi-stars {
  color: var(--amber);
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.testi-result {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green);
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-full);
  display: inline-block;
  margin-bottom: 0.85rem;
}
.testi-text {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1rem;
  font-style: italic;
}
.testi-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testi-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.testi-name {
  font-size: 0.82rem;
  font-weight: 700;
}
.testi-role {
  font-size: 0.75rem;
  color: var(--text-3);
}
.testi-link {
  font-size: 0.7rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
  text-decoration: none;
}

/* ============================================ */
/* ============================================ */
/* BOTTOM CTA                               */
/* ============================================ */
/* ============================================ */
.bottom-cta {
  padding: 6rem 0;
  text-align: center;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.bottom-cta::before {
  content: "";
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(
    ellipse at center top,
    rgba(43, 102, 230, 0.14) 0%,
    transparent 65%
  );
  pointer-events: none;
}
.bottom-cta h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.bottom-cta p {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.cta-guar {
  font-size: 0.8rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
}
.cta-guar i {
  color: var(--green);
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-top: 0.75rem;
  line-height: 1.6;
  max-width: 280px;
}

/* ============================================ */
/* ============================================ */
/* ============================================ */
/* CARD APPEAR ANIMATION FOR FILTER         */
/* ============================================ */
/* ============================================ */
/* ============================================ */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.p-card.appearing {
  animation: cardIn 0.4s var(--ease) forwards;
}

/* ============================================ */
/* ============================================ */
/* RESPONSIVE                               */
/* ============================================ */
/* ============================================ */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }
  .p-card:first-child {
    grid-column: span 2;
  }
  .testi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-inner {
    gap: 3rem;
  }
}
@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .p-card:first-child {
    grid-column: span 1;
  }
  .p-card:first-child .p-img {
    aspect-ratio: 16/9;
  }
  .testi-grid {
    grid-template-columns: 1fr;
  }
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-actions .btn {
    justify-content: center;
  }
  .stats-inner {
    gap: 2rem;
  }
  .mobile-menu-btn {
    display: block;
  }
  .modal-body {
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .modal-img {
    height: 180px;
  }
  .modal-actions {
    flex-direction: column;
  }
  .modal-visit,
  .modal-enquire {
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .filter-wrap {
    gap: 0.35rem;
  }
  .filter-btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.76rem;
  }
}

/* ══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   PORTFOLIO — Mobile Optimisation Layer v4.0
   Gap-closes only — portfolio is the reference implementation.
   ══════════════════════════════════════════════════════════════ */

/* ── FILTER BAR — horizontal scroll on very small phones ────── */
@media (max-width: 375px) {
  .filter-wrap {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding: 2rem 1.25rem 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .filter-wrap::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ── PORTFOLIO HERO (new style) ──────────────────────────────── */
@media (max-width: 480px) {
  .portfolio-hero-new {
    padding: 90px 1.25rem 3rem;
  }
  /* CTAs already column at 600px — keep, just tighten */
  .phn-ctas {
    gap: 0.65rem;
  }
  /* Trust / guarantee row */
  .phn-guarantee {
    gap: 0.65rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 375px) {
  .portfolio-hero-new {
    padding: 88px 1rem 2.5rem;
  }
  .phn-h1,
  .phn-typed-word,
  .phn-typed-for {
    font-size: 1.9rem !important;
  }
}

/* ── STATS BAR ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .stats-bar {
    padding: 2rem 0;
  }
  .stats-inner {
    gap: 1.5rem;
    padding: 0 1.25rem;
  }
  .si-val {
    font-size: 2rem;
  }
  .si-lbl {
    font-size: 0.75rem;
  }
}

@media (max-width: 375px) {
  .stats-inner {
    gap: 1.1rem;
  }
  .si-val {
    font-size: 1.75rem;
  }
}

/* ── PORTFOLIO GRID ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .portfolio-section {
    padding: 1.5rem 0 4rem;
  }
  .portfolio-grid {
    gap: 0.85rem;
    margin-top: 2rem;
  }
}

/* ── TESTIMONIALS ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .testi-section {
    padding: 3.5rem 0;
  }
  .testi-card {
    padding: 1.25rem;
  }
}

/* ── MODAL — bottom-sheet on mobile ─────────────────────────── */
@media (max-width: 600px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-height: 92vh;
    /* Sheet handle indicator */
  }
  .modal::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
    margin: 0.75rem auto 0;
  }
}

/* ── BOTTOM CTA ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .bottom-cta {
    padding: 4rem 0;
  }
  .bottom-cta h2 {
    font-size: clamp(1.65rem, 7vw, 2.4rem);
  }
}
/* ══════════════════════════════════════════════════════════════ */
