/* ═══════════ PROJECT DETAIL PAGE ═══════════ */

.project-detail {
  padding-top: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background: #f5f6fa;
}

.project-detail.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ CINEMATIC HERO BANNER ═══ */
.pd-hero-banner {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  overflow: hidden;
}

.pd-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(10, 15, 30, 0.92) 0%,
      rgba(10, 15, 30, 0.82) 35%,
      rgba(10, 15, 30, 0.55) 65%,
      rgba(10, 15, 30, 0.35) 100%);
  z-index: 1;
}

.pd-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 120px 0 80px;
}

/* ── Back Link ── */
.pd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  margin-bottom: 36px;
  transition: color 0.2s;
}

.pd-back-link:hover {
  color: #fff;
}

.pd-back-link svg {
  stroke: currentColor;
}

/* Hero Inner Grid */
.pd-hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

/* Badges */
.pd-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

/* Hero Typography */
.pd-hero-text h1 {
  font-family: var(--heading);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.06;
  margin-bottom: 14px;
  letter-spacing: -0.025em;
}

.pd-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.pd-desc {
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.45);
  max-width: 480px;
  margin-bottom: 36px;
}

.pd-cta-row {
  display: flex;
  gap: 12px;
}

.pd-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--blue-600);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(25, 73, 179, 0.3);
}

.pd-btn-primary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(25, 73, 179, 0.4);
}

/* ── Floating Screenshot Frame ── */
.pd-hero-screenshot-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pd-screenshot-frame {
  background: #1a1d2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 24px 80px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  max-width: 520px;
  width: 100%;
  transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
  transition: transform 0.5s ease;
}

.pd-screenshot-frame:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

.pd-screenshot-dots {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pd-screenshot-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.pd-screenshot-dots span:first-child {
  background: #ff5f57;
}

.pd-screenshot-dots span:nth-child(2) {
  background: #ffbd2e;
}

.pd-screenshot-dots span:nth-child(3) {
  background: #28c840;
}

.pd-hero-screenshot {
  width: 100%;
  display: block;
}

/* ═══ METRICS STRIP ═══ */
.pd-metrics {
  padding: clamp(36px, 5vh, 56px) 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.pd-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}

.pd-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px;
  position: relative;
}

.pd-metric:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: #e5e7eb;
}

.pd-metric-num {
  font-family: var(--heading);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.pd-metric-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* ═══ DETAILS GRID ═══ */
.pd-details {
  padding: clamp(56px, 8vh, 96px) 0;
}

.pd-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.pd-detail-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 32px;
  transition: box-shadow 0.3s ease;
}

.pd-detail-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.pd-detail-card h3 {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  padding-bottom: 14px;
  position: relative;
}

/* Teal accent bar under heading (tech.co style) */
.pd-detail-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue-600);
}

.pd-detail-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--gray-500);
}

/* Module List */
.pd-module-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-module-list li {
  font-size: 0.88rem;
  color: var(--gray-600);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}

.pd-module-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
  opacity: 0.5;
}

/* Tech Pills */
.pd-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-tech-pills span {
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  background: #f5f6fa;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.pd-tech-pills span:hover {
  background: #eef2ff;
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--blue-700);
}

/* ═══ CLIENT CARD ═══ */
.pd-client {
  padding: clamp(36px, 5vh, 56px) 0;
}

.pd-client-card {
  display: flex;
  align-items: center;
  gap: 32px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 32px 40px;
}

.pd-client-logos {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.pd-client-logos img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: grayscale(40%);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.pd-client-logos img:hover {
  filter: grayscale(0);
  opacity: 1;
}

.pd-client-info h3 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.pd-client-info p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ═══ GALLERY ═══ */
.pd-gallery {
  padding: clamp(48px, 7vh, 80px) 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.pd-gallery h2 {
  font-family: var(--heading);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
  position: relative;
  padding-top: 20px;
}

/* Teal accent bar above gallery heading */
.pd-gallery h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue-600);
}

.pd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.pd-gallery-item {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pd-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.pd-gallery-item img {
  width: 100%;
  display: block;
  height: auto;
  object-fit: cover;
  object-position: top center;
}

.pd-gallery-item span {
  display: block;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* Photo gallery items — full-bleed, taller aspect ratio */
.pd-gallery-photo img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pd-gallery-photo {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.pd-gallery-photo span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.84rem;
  font-weight: 600;
}

/* ═══ CTA SECTION ═══ */
.pd-cta-section {
  padding: clamp(56px, 8vh, 96px) 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.pd-cta-card {
  text-align: center;
  background: var(--gray-900);
  border-radius: 8px;
  padding: clamp(48px, 7vh, 80px) clamp(24px, 5vw, 64px);
  color: #fff;
}

.pd-cta-card h2 {
  font-family: var(--heading);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.pd-cta-card p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.pd-cta-card .pd-btn-primary {
  background: #fff;
  color: var(--gray-900);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.pd-cta-card .pd-btn-primary:hover {
  background: #f0f4ff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .pd-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pd-hero-screenshot-wrap {
    justify-content: center;
  }

  .pd-screenshot-frame {
    transform: none;
    max-width: 480px;
  }

  .pd-screenshot-frame:hover {
    transform: scale(1.01);
  }

  .pd-details-grid {
    grid-template-columns: 1fr;
  }

  .pd-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .pd-metric:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .pd-hero-banner {
    min-height: auto;
  }

  .pd-hero-content {
    padding: 100px 0 48px;
  }

  .pd-gallery-grid {
    grid-template-columns: 1fr;
  }

  .pd-client-card {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }

  .pd-client-logos {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .pd-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pd-detail-card {
    padding: 24px;
  }

  .pd-hero-text h1 {
    font-size: 1.8rem;
  }

  .pd-hero-text p {
    font-size: 0.88rem;
  }

  .pd-screenshot-frame {
    max-width: 100%;
  }

  .pd-section-title {
    font-size: 1.3rem;
  }

  .pd-gallery-grid {
    gap: 12px;
  }

  .pd-hero-content {
    padding: 90px 0 36px;
  }
}

@media (max-width: 400px) {
  .pd-hero-text h1 {
    font-size: 1.5rem;
  }

  .pd-metrics-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pd-detail-card {
    padding: 18px;
  }

  .pd-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .pd-client-card {
    padding: 22px 18px;
  }
}

/* ═══════════════════════════════════════════════════
   PROJECTS LISTING CATALOG PAGE (projects/index.html)
   Clean, Professional & Simple Redesign
   ═══════════════════════════════════════════════════ */

.pl-page {
  background: #ffffff;
  min-height: 100vh;
}

/* ── Hero Banner — Centered, Elegant ── */
.pl-hero {
  background: var(--gray-900);
  color: #fff;
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.pl-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(25, 73, 179, 0.18) 0%, transparent 80%),
    radial-gradient(circle at 80% 80%, rgba(25, 73, 179, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Subtle grid pattern overlay */
.pl-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.pl-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
}

.pl-hero-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: 20px;
}

.pl-hero-title {
  font-family: var(--heading);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -0.025em;
}

.pl-hero-desc {
  font-size: clamp(0.95rem, 1.15vw, 1.06rem);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Filter Tabs — Minimal Underline Style ── */
.pl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.pl-filter-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 0;
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.pl-filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--blue-400);
  transition: all 0.25s ease;
  transform: translateX(-50%);
}

.pl-filter-btn:hover {
  color: rgba(255, 255, 255, 0.85);
}

.pl-filter-btn.active {
  color: #fff;
}

.pl-filter-btn.active::after {
  width: 100%;
}

/* ── Showcase Grid — 2 Columns with Featured Card ── */
.pl-catalog-section {
  padding: clamp(56px, 8vh, 96px) 0;
  background: #fff;
}

.pl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ── Showcase Card ── */
.pl-card {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(20px);
}

.pl-card--animate {
  animation: cardFadeIn 0.5s ease forwards;
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pl-card:hover {
  transform: translateY(-4px);
  border-color: #dde4ed;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.07);
}

.pl-card.is-hidden {
  display: none !important;
}

/* Featured card spans full width */
.pl-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.pl-card--featured .pl-card-img-wrap {
  aspect-ratio: auto;
  min-height: 360px;
}

/* Card Image */
.pl-card-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f0f2f5;
  line-height: 0;
}

.pl-card-img-wrap img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.pl-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.04) 100%);
  pointer-events: none;
  transition: background 0.4s ease;
}

.pl-card:hover .pl-card-img-wrap img {
  transform: scale(1.03);
}

.pl-card:hover .pl-card-img-overlay {
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.08) 100%);
}

/* Card Body */
.pl-card-body {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
}

.pl-card-category-badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 14px;
  position: relative;
  padding-left: 14px;
}

.pl-card-category-badge::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-500);
}

.pl-card-title {
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 4px;
}

.pl-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pl-card-title a:hover {
  color: var(--blue-600);
}

.pl-card-subtitle {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 14px;
}

.pl-card-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray-500);
  margin-bottom: 20px;
  flex: 1;
}

/* Card Meta (clients + stats) */
.pl-card-meta {
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  margin-bottom: 18px;
}

.pl-card-clients {
  font-size: 0.78rem;
  color: var(--gray-400);
  font-weight: 400;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pl-card-clients svg {
  color: var(--gray-300);
  flex-shrink: 0;
}

.pl-card-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pl-card-stat {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.pl-card-stat strong {
  font-weight: 700;
  color: var(--gray-900);
  font-size: 0.82rem;
}

/* Card CTA button */
.pl-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-600);
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  transition: gap 0.25s ease, color 0.2s ease;
}

.pl-card:hover .pl-card-btn {
  color: var(--blue-800);
  gap: 12px;
}

.pl-card-btn svg {
  transition: transform 0.25s ease;
}

.pl-card:hover .pl-card-btn svg {
  transform: translateX(4px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pl-card--featured {
    grid-template-columns: 1fr;
  }

  .pl-card--featured .pl-card-img-wrap {
    min-height: 240px;
    aspect-ratio: 16 / 9;
  }
}

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

  .pl-hero {
    padding: 120px 0 56px;
  }

  .pl-hero-title {
    font-size: 2.2rem;
  }

  .pl-card-title {
    font-size: 1.28rem;
  }

  .pl-card-body {
    padding: 22px 20px 20px;
  }
}

@media (max-width: 480px) {
  .pl-hero {
    padding: 100px 0 44px;
  }

  .pl-filters {
    gap: 4px;
  }

  .pl-filter-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}