/* Trident HVAC — Projects page styles */

/* ── Hero: right-side proof image card (desktop only) ────────── */
.projects-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 1080px) {
  .projects-hero-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

.projects-hero-side { display: none; }
@media (min-width: 1080px) {
  .projects-hero-side { display: block; }
}

.projects-hero-card {
  position: relative;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  aspect-ratio: 4 / 5;
}
.projects-hero-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.projects-hero-card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 18px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── Hero CTAs: project-specific layout (primary quote / view grid / call) ── */
.projects-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.projects-hero-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.15s;
}
.projects-hero-call:hover { color: #fff; }
.projects-hero-call svg { color: var(--accent); }

/* ── Proof line above filters ─────────────────────────────────── */
.projects-proof {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 24px;
  max-width: 760px;
}

/* ── Filter pills ────────────────────────────────────────────── */
.projects-section {
  background: var(--bg);
  padding: 80px 0 120px;
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.projects-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.projects-filter:hover {
  border-color: var(--ink-3);
  transform: translateY(-1px);
}
.projects-filter.active {
  /* inline style sets background + border + color from accent */
}
.projects-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.projects-filter.active .projects-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ── Project grid ────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .25s;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: 0 20px 40px rgba(5, 29, 62, 0.08);
}

.project-card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  overflow: hidden;
}
.project-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .project-card-thumb img {
  transform: scale(1.04);
}
.project-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-4);
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}

.project-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.project-card-ba-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Before/after comparison thumb (when both images present) ──── */
.project-card-thumb-ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-2);
  position: relative;
}
.thumb-half {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.thumb-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.project-card-ba:hover .thumb-half-before img,
.project-card-ba:hover .thumb-half-after img {
  transform: scale(1.04);
}
.thumb-half-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 5px 11px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.thumb-half-label-after {
  color: #fff;
}
.thumb-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 1;
}

/* On the comparison view, override the default thumb aspect-ratio (the halves provide it) */
.project-card-thumb.project-card-thumb-ba {
  aspect-ratio: auto;
}

/* ── Composite before/after thumb (single square image w/ built-in B/A + branding) ─ */
.project-card-thumb-composite {
  aspect-ratio: 1 / 1;
  background: #0c1a30;
}
.project-card-thumb-composite img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.project-card-composite:hover .project-card-thumb-composite img {
  transform: none;
}
.project-card-thumb-composite .project-card-badge {
  top: 10px;
  left: 10px;
  font-size: 10px;
  padding: 4px 10px;
}

.project-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.project-card-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.project-card-location svg {
  color: var(--accent);
}

.project-card-body h3 {
  font-family: var(--font-display);
  font-size: 20px;          /* H6 in our scale */
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.40;
  color: var(--ink);
  margin: 0;
}

.project-card-equipment {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.45;
}
.project-card-equipment svg {
  color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.project-card-desc {
  font-size: 16px;          /* small paragraph */
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-3);
  margin: 0;
  flex: 1;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.project-card-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

/* ── Per-card CTA: "Get a Similar Quote" ─────────────────────── */
.project-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  width: 100%;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(214, 51, 67, 0.18);
}
.project-card-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 10px 22px rgba(214, 51, 67, 0.25);
}
.project-card-cta:focus-visible {
  outline: 3px solid rgba(214, 51, 67, 0.45);
  outline-offset: 2px;
}

/* ── Mid-page CTA (after card 6) ─────────────────────────────── */
.projects-mid-cta {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--bg-2), #fff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 32px;
}
.projects-mid-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.projects-mid-cta-copy { flex: 1 1 320px; min-width: 0; }
.projects-mid-cta-copy h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.projects-mid-cta-copy p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0;
}
.projects-mid-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.btn-mid-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
}
.btn-mid-cta-primary { color: #fff; box-shadow: 0 8px 18px rgba(214, 51, 67, 0.22); }
.btn-mid-cta-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-mid-cta-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-mid-cta-ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-mid-cta-ghost svg { color: var(--accent); }

/* ── Bottom CTA section (project-specific) ───────────────────── */
.projects-bottom-cta {
  background: var(--bg-2);
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.projects-bottom-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.projects-bottom-cta-copy {
  flex: 1 1 480px;
  min-width: 0;
}
.projects-bottom-cta-copy h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.projects-bottom-cta-copy p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 620px;
}
.projects-bottom-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}
.btn-bottom-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border: 0;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
}
.btn-bottom-cta-primary { color: #fff; box-shadow: 0 10px 22px rgba(214, 51, 67, 0.22); }
.btn-bottom-cta-primary:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 14px 28px rgba(214, 51, 67, 0.28); }
.btn-bottom-cta-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-bottom-cta-ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-bottom-cta-ghost svg { color: var(--accent); }

/* ── Empty state ─────────────────────────────────────────────── */
.projects-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.6;
}
.projects-empty a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 980px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .projects-mid-cta { padding: 22px 24px; }
  .projects-bottom-cta-copy h2 { font-size: 28px; }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .projects-filters { gap: 8px; padding-bottom: 20px; margin-bottom: 32px; }
  .projects-filter { padding: 8px 14px; font-size: 13px; }
  .projects-section { padding: 56px 0 80px; }
  .projects-proof { font-size: 15px; }
  .projects-hero-ctas { flex-direction: column; align-items: stretch; }
  .projects-hero-ctas .btn-hero { width: 100%; justify-content: space-between; }
  .projects-hero-call { justify-content: center; padding: 4px 0; }
  .projects-mid-cta { padding: 22px 18px; border-radius: 14px; }
  .projects-mid-cta-actions { width: 100%; }
  .btn-mid-cta { flex: 1 1 auto; min-width: 0; padding: 12px 16px; }
  .projects-bottom-cta { padding: 56px 0; }
  .projects-bottom-cta-inner { flex-direction: column; align-items: stretch; gap: 22px; }
  .projects-bottom-cta-copy h2 { font-size: 26px; }
  .projects-bottom-cta-copy p { font-size: 15px; }
  .projects-bottom-cta-actions { flex-direction: column; }
  .btn-bottom-cta { width: 100%; padding: 14px 20px; }
  .project-card-cta { padding: 14px 18px; }
}

/* projects-hero just inherits .detail-hero — no overrides needed */

/* ── Project detail page (per-project) ──────────────────────── */
.project-card-link {
  text-decoration: none;
  color: inherit;
}

.project-detail-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.project-detail-images figure {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 14px 32px rgba(5, 29, 62, 0.08);
}
.project-detail-images img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.project-detail-images figcaption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.project-detail-image {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 14px 32px rgba(5, 29, 62, 0.08);
}
.project-detail-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-detail-spec-list li {
  font-size: 16px;
}
.project-detail-spec-list b {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 720px) {
  .project-detail-images { grid-template-columns: 1fr; }
}
