/* ============================================
   FLOATEX SOLAR — project-detail.css
============================================ */

/* ---- Page base ---- */
body {
  background: #081023;
  overflow: hidden;
}

.site-footer {
  display: none;
}

/* ---- Fullscreen background image ---- */
.pd__hero-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: opacity 1s ease;
  animation: slowZoomBg 15s ease-in-out infinite alternate;
  will-change: transform, scale;
}

@keyframes slowZoomBg {
  0% {
    scale: 1;
  }

  100% {
    scale: 1.15;
  }
}

/* ---- Dark overlay ---- */
.pd__hero-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(8, 16, 35, 0.35) 0%, transparent 60%);
}

/* ---- Bottom strip wrapper — matches navbar width & padding ---- */
.pd__strip-wrapper {
  position: fixed;
  bottom: 1.1rem;
  left: 0;
  right: 0;
  padding: 0 var(--container-pad);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ---- Detached nav buttons ---- */
.pd__strip-nav {
  flex-shrink: 0;
  width: 56px;
  align-self: stretch;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--color-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.25s, background 0.2s;
}

.pd__strip-nav:first-child {
  border-radius: 8px 0 0 8px;
}

.pd__strip-nav:last-child {
  border-radius: 0 8px 8px 0;
}

.pd__strip-nav:hover:not(:disabled) {
  background: #f5f5f5;
}

.pd__strip-nav:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.pd__strip-nav svg {
  pointer-events: none;
  width: 22px;
  height: 22px;
}

/* ---- White strip panel ---- */
.pd__strip {
  flex: 1;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 0;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* ---- Sliding track ---- */
.pd__strip-track {
  display: flex;
  width: 100%;
  /* transition added by JS only after first render */
}

/* ---- Each item = 1/5 of the track ---- */
.pd__strip-item {
  flex-shrink: 0;
  width: 20%;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.22s;
  justify-content: center;
}

.pd__strip-item:last-child {
  border-right: none;
}

.pd__strip-item:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.03);
}

.pd__strip-item.is-active {
  background: #FCAF17;
  cursor: default;
}

.pd__strip-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.pd__strip-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.pd__strip-item.is-active .pd__strip-name {
  color: #000;
  font-weight: 700;
}

.pd__strip-num {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.28);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.pd__strip-item.is-active .pd__strip-num {
  color: rgba(0, 0, 0, 0.4);
}

.pd__strip-loc {
  font-size: 0.71rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.66);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.pd__strip-item.is-active .pd__strip-loc {
  color: rgba(0, 0, 0, 0.5);
}

.pd__strip-item.is-active .pd__strip-loc {
  color: rgba(0, 0, 0, 0.5);
}

/* ---- Details columns — left & right center ---- */
.pd__details-col {
  position: fixed;
  left: var(--container-pad, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.pd__details-col--right {
  left: auto;
  right: var(--container-pad, 2rem);
}

/* ---- Stats grid — bottom-right over hero ---- */
.pd__stats-grid {
  position: fixed;
  bottom: calc(1.1rem + 92px + 2.2rem);
  right: var(--container-pad, 2rem);
  z-index: 9;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  pointer-events: none;
}

.pd__stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  min-width: 100px;
}

.pd__stat-card .pd__stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d1b2a;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pd__stat-card .pd__stat-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #FCAF17;
  line-height: 1;
}

/* ---- MW display — bottom-left hero overlay ---- */
.pd__mw-display {
  position: fixed;
  bottom: calc(1.1rem + 92px + 2.2rem);
  left: var(--container-pad, 2rem);
  z-index: 9;
  display: flex;
  align-items: baseline;
  gap: 0;
  pointer-events: none;
  line-height: 1;
}

.pd__mw-digit {
  display: inline-block;
  font-size: clamp(3.5rem, 7.5vw, 6.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
  font-variant-numeric: tabular-nums;
}

.pd__mw-unit {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  color: #FCAF17;
  letter-spacing: 0.12em;
  margin-left: 0.4em;
  text-shadow: 0 2px 16px rgba(252, 175, 23, 0.35);
}

/* ---- Image click zones — stop above bottom navbar ---- */
.pd__zone {
  position: fixed;
  top: 0;
  bottom: calc(1.1rem + 80px);
  /* 1.1rem wrapper offset + strip height */
  width: 35%;
  z-index: 4;
  cursor: none;
}

.pd__zone--left {
  left: 0;
}

.pd__zone--right {
  right: 0;
}

/* ---- Custom cursor — navbar style ---- */
.pd__cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: opacity 0.45s ease, transform 0.45s ease;
  will-change: transform, opacity;
}

.pd__cursor.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pd__cursor-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* ---- Header auto-hide ---- */
/* The existing .nav--hidden class in components.css handles translateY(-120%).
   We just add a hover-zone sentinel at the top of the screen. */

.pd__header-zone {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 9999;
  pointer-events: auto;
}

/* ============================================
   MOBILE OVERLAY + SPECS PANEL (hidden by default, shown < 640px)
============================================ */

/* ---- Overlay: text directly on gradient, no card background ---- */
.pd__mob-overlay {
  display: none;
  position: fixed;
  bottom: calc(0.75rem + 64px + 1rem);
  left: var(--container-pad, 1.25rem);
  right: var(--container-pad, 1.25rem);
  z-index: 8;
}

.pd__mob-mw-row {
  display: flex;
  align-items: baseline;
  gap: 0.25em;
  line-height: 1;
  margin-bottom: 2px;
}

.pd__mob-mw-num {
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.5);
}

.pd__mob-mw-tag {
  font-size: 1rem;
  font-weight: 700;
  color: #FCAF17;
  letter-spacing: 0.12em;
  /* text-transform: uppercase; */
}

.pd__mob-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

/* Developer / EPC */
.pd__mob-parties {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.pd__mob-party {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pd__mob-party-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.pd__mob-party-lbl {
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #FCAF17;
  line-height: 1;
}

.pd__mob-vline {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 14px;
  flex-shrink: 0;
}

/* Commissioned */
.pd__mob-comm-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}

.pd__mob-comm-lbl {
  flex: 1;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.pd__mob-comm-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* "View Project Specs" button */
.pd__mob-specs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 8px 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s;
}

.pd__mob-specs-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

/* ---- Specs glass panel — hidden until button tap ---- */
.pd__mob-specs {
  display: none;
  position: fixed;
  bottom: calc(0.75rem + 64px + 0.75rem);
  left: var(--container-pad, 1.25rem);
  right: var(--container-pad, 1.25rem);
  z-index: 9;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(8, 16, 35, 0.68);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  max-height: calc(100vh - 72px - 0.75rem - 64px - 2rem);
  overflow-y: auto;
  /* animation */
  opacity: 0;
  transform: translateY(14px);
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.35s;
  pointer-events: none;
}

.pd__mob-specs.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
  pointer-events: auto;
}

/* Specs header bar */
.pd__mob-specs-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pd__mob-specs-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.pd__mob-specs-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.pd__mob-specs-close:active {
  background: rgba(255, 255, 255, 0.22);
}

/* Icon wrap */
.pd__mob-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(91, 155, 213, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Stats list */
.pd__mob-stats {
  display: flex;
  flex-direction: column;
}

.pd__mob-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pd__mob-stat:last-child {
  border-bottom: none;
}

.pd__mob-stat-lbl {
  flex: 1;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.pd__mob-stat-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

/* ============================================
   RESPONSIVE
============================================ */

/* ---- Mobile strip label (hidden on desktop) ---- */
.pd__strip-mobile {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 1rem;
  min-height: 52px;
  overflow: hidden;
}

.pd__strip-mob-counter {
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
  line-height: 1;
}

.pd__strip-mob-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---- 1440px+ large desktop ---- */
@media (min-width: 1440px) {
  .pd__mw-digit {
    font-size: 7.5rem;
  }

  .pd__stat-card {
    padding: 0.8rem 1.15rem;
    min-width: 118px;
  }

  .pd__stat-card .pd__stat-val {
    font-size: 1.25rem;
  }

  .pd__stats-grid {
    gap: 8px;
  }
}

/* ---- 1024px–1439px: 4 items ---- */
@media (max-width: 1439px) {
  .pd__strip-item {
    width: 25%;
  }
}

/* ---- 900px–1023px tablet: 3 items ---- */
@media (max-width: 1023px) {
  .pd__strip-item {
    width: 33.333%;
  }

  /* Columns: smaller cards */
  .pd__details-col .pd__stat-card,
  .pd__stat-card {
    padding: 0.55rem 0.78rem;
    min-width: 82px;
  }

  .pd__stat-card .pd__stat-val {
    font-size: 0.98rem;
  }

  .pd__stat-card .pd__stat-label {
    font-size: 0.5rem;
  }

  /* MW: slightly smaller */
  .pd__mw-digit {
    font-size: clamp(3rem, 6.5vw, 5.5rem);
  }

  .pd__mw-display,
  .pd__stats-grid {
    bottom: calc(1.1rem + 88px + 2rem);
  }

  .pd__zone {
    bottom: calc(1.1rem + 88px);
  }
}

/* ---- 640px–899px tablet: 2 strip items, all data visible ---- */
@media (max-width: 899px) {

  /* Detail columns — show, smaller cards */
  .pd__details-col .pd__stat-card,
  .pd__details-col--right .pd__stat-card {
    padding: 0.42rem 0.58rem;
    min-width: 72px;
  }

  .pd__details-col .pd__stat-val,
  .pd__details-col--right .pd__stat-val {
    font-size: 0.82rem;
  }

  .pd__details-col .pd__stat-label,
  .pd__details-col--right .pd__stat-label {
    font-size: 0.46rem;
  }

  /* Hide cursor — no precision pointer on tablet */
  .pd__cursor {
    display: none !important;
  }

  /* Strip: 2 items */
  .pd__strip-item {
    width: 50%;
    padding: 0.8rem 0.9rem;
  }

  .pd__strip-name {
    font-size: 0.65rem;
  }

  .pd__strip-loc {
    font-size: 0.55rem;
  }

  .pd__strip-num {
    font-size: 0.5rem;
  }

  /* Stats grid + MW: compact, bottom */
  .pd__stats-grid {
    gap: 5px;
    bottom: calc(1.1rem + 80px + 1.4rem);
  }

  .pd__stat-card {
    padding: 0.42rem 0.58rem;
    min-width: 68px;
  }

  .pd__stat-card .pd__stat-val {
    font-size: 0.82rem;
  }

  .pd__stat-card .pd__stat-label {
    font-size: 0.46rem;
  }

  .pd__mw-display {
    bottom: calc(1.1rem + 80px + 1.4rem);
  }

  .pd__mw-digit {
    font-size: clamp(3.2rem, 10vw, 5rem);
  }

  .pd__zone {
    bottom: calc(1.1rem + 80px);
  }
}

/* ---- < 640px mobile: 1 item ---- */
@media (max-width: 639px) {

  /* Stronger bottom gradient so overlay text is readable */
  .pd__hero-overlay {
    background: linear-gradient(
      to top,
      rgba(8, 16, 35, 0.92) 0%,
      rgba(8, 16, 35, 0.68) 22%,
      rgba(8, 16, 35, 0.2) 48%,
      transparent 66%
    );
  }

  /* Show new mobile elements */
  .pd__mob-overlay { display: block; }
  .pd__mob-specs   { display: block; }

  /* Hide desktop overlay cards */
  .pd__mw-display,
  .pd__details-col,
  .pd__details-col--right,
  .pd__stats-grid {
    display: none !important;
  }

  .pd__cursor {
    display: none !important;
  }

  /* Strip: 1 item full-width */
  .pd__strip {
    display: flex;
    border-radius: 8px;
  }

  .pd__strip-mobile {
    display: none !important;
  }

  .pd__strip-item {
    width: 100%;
    padding: 0.7rem 1rem;
  }

  .pd__strip-name {
    font-size: 0.75rem;
  }

  .pd__strip-loc {
    font-size: 0.58rem;
  }

  .pd__strip-num {
    font-size: 0.5rem;
  }

  /* Zones */
  .pd__zone {
    width: 50%;
    bottom: calc(0.75rem + 64px);
  }

  .pd__zone--left { left: 0; }
  .pd__zone--right { right: 0; }

  .pd__strip-wrapper {
    bottom: 0.75rem;
    gap: 6px;
  }

  .pd__strip-nav {
    width: 48px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .pd__strip-nav:first-child { border-radius: 8px; }
  .pd__strip-nav:last-child  { border-radius: 8px; }

  .pd__strip-nav svg {
    width: 16px;
    height: 16px;
  }
}