/* =====================================================
   ESTATE DESIGN & CONSTRUCTION — PUBLIC WORKS DIVISION
   Civic identity theme (navy / slate / steel).
   Layered on top of style.css + upgrade.css.
   Scope: everything under  <body class="pw">.
   ===================================================== */

body.pw {
  /* Re-tint the shared "gold" accent to civic steel-blue so every
     reused component (buttons, labels, underlines) adopts the
     Public Works palette automatically. */
  --gold:        #5b8cc0;
  --gold-light:  #86b0dc;
  --gold-dark:   #3a6594;
  /* Gradient + glow tokens (from upgrade.css) re-tinted to steel */
  --gold-grad:   linear-gradient(135deg, #86b0dc 0%, #5b8cc0 48%, #3a6594 100%);
  --gold-soft:   rgba(91,140,192,0.12);
  --gold-ring:   rgba(91,140,192,0.45);
  --shadow-gold: 0 10px 30px rgba(20,49,82,0.45);

  /* Public-Works-specific tokens */
  --pw-navy:     #0a1727;
  --pw-navy-2:   #0e2034;
  --pw-slate:    #14273d;
  --pw-slate-2:  #1a3047;
  --pw-line:     rgba(174, 201, 230, 0.14);
  --pw-text:     #eaf1f9;
  --pw-muted:    rgba(220, 232, 245, 0.66);
  --pw-accent:   #5b8cc0;
  --pw-accent-2: #86b0dc;

  background: var(--pw-navy);
  color: var(--pw-text);
}

/* Subtle engineered grid + glow over the whole page */
body.pw::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% -5%, rgba(91,140,192,0.16) 0%, transparent 60%),
    linear-gradient(180deg, var(--pw-navy) 0%, var(--pw-navy-2) 60%, var(--pw-navy) 100%);
}

/* ---------- NAVBAR (dark civic) ---------- */
body.pw #navbar.scrolled {
  background: rgba(8, 19, 33, 0.95);
  box-shadow: 0 2px 30px rgba(0,0,0,0.45);
  border-bottom: 1px solid var(--pw-line);
}
body.pw .nav-links a:hover,
body.pw .nav-links a.active { color: var(--pw-accent-2); }

/* Primary button shadow → steel */
body.pw .btn-primary { box-shadow: 0 6px 18px rgba(20,49,82,0.4); color: #fff; }

/* Logo lock-up with division tag */
.pw-logo { display: flex; align-items: center; gap: 14px; }
.pw-logo-tag {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--pw-accent-2);
  border-left: 1px solid var(--pw-line);
  padding-left: 14px;
  line-height: 1.25;
  max-width: 96px;
}

/* Department switcher (gateway back to residential site) */
.pw-switch {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(234,241,249,0.82);
  border: 1px solid var(--pw-line);
  border-radius: 999px;
  padding: 9px 16px;
  transition: var(--transition);
  white-space: nowrap;
}
.pw-switch:hover {
  color: #fff; border-color: var(--pw-accent);
  background: rgba(91,140,192,0.14);
}
.pw-switch i { font-size: 0.72rem; }
@media (max-width: 992px) { .pw-switch { display: none; } }

/* Mobile menu — civic */
body.pw .mobile-menu { background: rgba(8,19,33,0.98); }
body.pw .mobile-menu a:hover { color: var(--pw-accent-2); }
.pw-mobile-switch {
  margin-top: 10px;
  font-size: 0.8rem !important;
  color: var(--pw-accent-2) !important;
  letter-spacing: 1.5px;
}

/* ---------- SECTION THEMING ON NAVY ---------- */
body.pw .section { background: transparent; }
body.pw .section-alt,
body.pw .pw-section-alt {
  background: linear-gradient(180deg, var(--pw-slate) 0%, var(--pw-navy-2) 100%);
  border-top: 1px solid var(--pw-line);
  border-bottom: 1px solid var(--pw-line);
}
body.pw .section-title { color: var(--pw-text); }
body.pw .section-subtitle { color: var(--pw-muted); }
body.pw .section-label { color: var(--pw-accent-2); }
body.pw .text-center .section-title::after {
  content: ''; display: block; width: 56px; height: 2px; margin: 22px auto 0;
  background: linear-gradient(90deg, var(--pw-accent), var(--pw-accent-2));
  border-radius: 2px;
}

/* ---------- HERO ---------- */
.pw-hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 0 90px;
  overflow: hidden;
}
.pw-hero-media { position: absolute; inset: 0; z-index: 0; }
.pw-hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) brightness(0.62);
}
.pw-hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,19,33,0.55) 0%, rgba(8,19,33,0.35) 40%, rgba(8,19,33,0.92) 100%),
    linear-gradient(90deg, rgba(8,19,33,0.85) 0%, transparent 60%);
}
.pw-hero .container { position: relative; z-index: 2; }
.pw-hero-inner { max-width: 760px; }
.pw-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--pw-accent-2);
  margin-bottom: 22px;
}
.pw-eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--pw-accent); }
.pw-hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.3rem);
  line-height: 1.05; color: #fff; margin-bottom: 22px;
}
.pw-hero h1 em { color: var(--pw-accent-2); font-style: italic; }
.pw-hero p.pw-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: rgba(234,241,249,0.86);
  max-width: 620px; line-height: 1.6; margin-bottom: 34px;
}
.pw-hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- TRUST BAR ---------- */
.pw-trust {
  position: relative; z-index: 3;
  border-top: 1px solid var(--pw-line);
  background: rgba(8,19,33,0.6);
  backdrop-filter: blur(6px);
}
.pw-trust-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.pw-trust-item {
  display: flex; align-items: center; gap: 14px;
  padding: 26px 24px;
  border-right: 1px solid var(--pw-line);
}
.pw-trust-item:last-child { border-right: none; }
.pw-trust-item i { color: var(--pw-accent-2); font-size: 1.5rem; flex-shrink: 0; }
.pw-trust-item b { display: block; color: #fff; font-size: 0.92rem; font-weight: 600; letter-spacing: 0.3px; }
.pw-trust-item span { display: block; color: var(--pw-muted); font-size: 0.74rem; letter-spacing: 0.5px; }
@media (max-width: 992px) {
  .pw-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .pw-trust-item:nth-child(2n) { border-right: none; }
  .pw-trust-item { border-bottom: 1px solid var(--pw-line); }
}
@media (max-width: 560px) { .pw-trust-grid { grid-template-columns: 1fr; } .pw-trust-item { border-right: none; } }

/* ---------- CAPABILITY CARDS ---------- */
.pw-cap-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 54px;
}
/* Center a lone card on the last row (e.g. 7 cards in a 3-col grid) */
.pw-cap-grid > .pw-cap:last-child:nth-child(3n + 1) { grid-column: 2; }
@media (max-width: 900px) { .pw-cap-grid > .pw-cap:last-child:nth-child(3n + 1) { grid-column: auto; } }
@media (max-width: 900px) { .pw-cap-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pw-cap-grid { grid-template-columns: 1fr; } }
.pw-cap {
  background: var(--pw-slate);
  border: 1px solid var(--pw-line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: var(--transition);
}
.pw-cap:hover {
  border-color: rgba(91,140,192,0.5);
  background: var(--pw-slate-2);
  transform: translateY(-4px);
}
.pw-cap-icon {
  width: 54px; height: 54px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(91,140,192,0.14);
  color: var(--pw-accent-2); font-size: 1.4rem;
  margin-bottom: 20px;
}
.pw-cap h4 { color: #fff; font-size: 1.18rem; margin-bottom: 10px; }
.pw-cap p { color: var(--pw-muted); font-size: 0.95rem; line-height: 1.6; }

/* ---------- FEATURED PROJECTS ---------- */
.pw-feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 52px; }
@media (max-width: 900px) { .pw-feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pw-feat-grid { grid-template-columns: 1fr; } }
.pw-feat {
  position: relative; display: block; border-radius: var(--radius);
  overflow: hidden; background: var(--pw-slate);
  border: 1px solid var(--pw-line);
  min-height: 320px;
  transition: var(--transition);
}
.pw-feat img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.7s ease; filter: brightness(0.8);
}
.pw-feat:hover img { transform: scale(1.06); }
.pw-feat::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(8,19,33,0.95) 100%);
}
.pw-feat-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px; }
.pw-feat-tag {
  display: inline-block; font-family: 'Jost', sans-serif;
  font-size: 0.64rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--pw-accent-2); margin-bottom: 8px;
}
.pw-feat-body h4 { color: #fff; font-size: 1.3rem; margin-bottom: 6px; }
.pw-feat-body p { color: rgba(234,241,249,0.8); font-size: 0.85rem; }
.pw-feat-body .pw-feat-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  color: var(--pw-accent-2); font-size: 0.78rem; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 600;
}
.pw-feat:hover .pw-feat-link i { transform: translateX(5px); }
.pw-feat-link i { transition: transform 0.3s ease; }

/* ---------- STATS ---------- */
.pw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 10px; }
@media (max-width: 720px) { .pw-stats { grid-template-columns: 1fr 1fr; } }
.pw-stat { text-align: center; padding: 30px 16px; border: 1px solid var(--pw-line); border-radius: var(--radius); background: rgba(20,39,61,0.5); }
.pw-stat-num { font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 600; color: var(--pw-accent-2); line-height: 1; }
.pw-stat-label { display: block; margin-top: 10px; font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pw-muted); }

/* ---------- AGENCIES SERVED ---------- */
.pw-agencies { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 44px; }
.pw-agency {
  font-family: 'Jost', sans-serif; font-size: 0.82rem; letter-spacing: 0.5px;
  color: rgba(234,241,249,0.82);
  border: 1px solid var(--pw-line); border-radius: 999px;
  padding: 11px 20px; background: rgba(20,39,61,0.4);
  transition: var(--transition);
}
.pw-agency:hover { border-color: var(--pw-accent); color: #fff; }
.pw-agency i { color: var(--pw-accent-2); margin-right: 8px; font-size: 0.78rem; }

/* ---------- PORTFOLIO (cards reuse .commercial-card) ---------- */
body.pw .commercial-card { background: var(--pw-slate); box-shadow: 0 24px 60px -34px rgba(0,0,0,0.85); border: 1px solid var(--pw-line); }
body.pw .commercial-card:hover { border-color: rgba(91,140,192,0.45); }
body.pw .commercial-card-body h4 { color: #fff; }
body.pw .commercial-card-body p { color: var(--pw-muted); }
body.pw .commercial-card-body p i { color: var(--pw-accent-2); }
body.pw .portfolio-photo-count { color: rgba(220,232,245,0.55); }

/* Filter bar */
.pw-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 40px 0 8px; }
.pw-filters .filter-btn {
  font-family: 'Jost', sans-serif; font-size: 0.74rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(234,241,249,0.78);
  background: transparent; border: 1px solid var(--pw-line);
  padding: 10px 20px; border-radius: 999px; cursor: pointer; transition: var(--transition);
}
.pw-filters .filter-btn:hover { border-color: var(--pw-accent); color: #fff; }
.pw-filters .filter-btn.active { background: var(--pw-accent); border-color: var(--pw-accent); color: #fff; }
.portfolio-item.hidden { display: none; }

/* ---------- WHY / PROCESS / FEATURE CARDS on navy ---------- */
body.pw .why-card { background: var(--pw-slate); border: 1px solid var(--pw-line); }
body.pw .why-card:hover { background: var(--pw-slate-2); border-color: rgba(91,140,192,0.45); }
body.pw .why-card h4 { color: #fff; }
body.pw .why-card p { color: var(--pw-muted); }
body.pw .why-icon { background: rgba(91,140,192,0.14); color: var(--pw-accent-2); }

/* Process steps */
.pw-process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 50px; counter-reset: step; }
@media (max-width: 900px) { .pw-process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pw-process { grid-template-columns: 1fr; } }
.pw-step { position: relative; padding: 30px 22px; border: 1px solid var(--pw-line); border-radius: var(--radius); background: var(--pw-slate); }
.pw-step-num {
  font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; color: var(--pw-accent-2);
  line-height: 1; display: block; margin-bottom: 12px; opacity: 0.85;
}
.pw-step h4 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.pw-step p { color: var(--pw-muted); font-size: 0.88rem; line-height: 1.55; }

/* ---------- CASE STUDY ---------- */
.pw-cs-hero { position: relative; min-height: 70vh; display: flex; align-items: flex-end; padding: 160px 0 60px; overflow: hidden; }
.pw-cs-hero-media { position: absolute; inset: 0; z-index: 0; }
.pw-cs-hero-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }
.pw-cs-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,19,33,0.7) 0%, transparent 35%, rgba(8,19,33,0.95) 100%); }
.pw-cs-hero .container { position: relative; z-index: 2; }
.pw-cs-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 14px 0 10px; }
.pw-cs-loc { color: var(--pw-accent-2); font-size: 1rem; letter-spacing: 0.5px; }
.pw-cs-loc i { margin-right: 8px; }

.pw-cs-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--pw-line); border: 1px solid var(--pw-line); border-radius: var(--radius); overflow: hidden; margin-top: 46px; }
@media (max-width: 720px) { .pw-cs-facts { grid-template-columns: 1fr 1fr; } }
.pw-cs-fact { background: var(--pw-slate); padding: 26px 24px; }
.pw-cs-fact span { display: block; font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pw-accent-2); margin-bottom: 8px; }
.pw-cs-fact b { color: #fff; font-size: 1.05rem; font-weight: 600; }

.pw-cs-body { max-width: 820px; }
.pw-cs-body p { color: rgba(234,241,249,0.82); font-size: 1.06rem; line-height: 1.8; margin-bottom: 22px; }
.pw-cs-body h3 { color: #fff; font-size: 1.5rem; margin: 38px 0 14px; }
.pw-cs-scope { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
@media (max-width: 600px) { .pw-cs-scope { grid-template-columns: 1fr; } }
.pw-cs-scope li { color: rgba(234,241,249,0.82); padding-left: 28px; position: relative; line-height: 1.5; }
.pw-cs-scope li::before { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--pw-accent-2); position: absolute; left: 0; top: 1px; }

/* Gallery grid (lightbox-triggering) */
.pw-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
@media (max-width: 800px) { .pw-gallery { grid-template-columns: 1fr 1fr; } }
.pw-gallery-item { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; border: 1px solid var(--pw-line); }
.pw-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.pw-gallery-item:hover img { transform: scale(1.07); }
.pw-gallery-item::after { content: '\f00e'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(8,19,33,0.0); opacity: 0; transition: var(--transition); font-size: 1.4rem; }
.pw-gallery-item:hover::after { opacity: 1; background: rgba(8,19,33,0.35); }

/* ---------- CONTACT (bid/RFP) ---------- */
body.pw .form-group label { color: rgba(234,241,249,0.82); }
body.pw .form-group input,
body.pw .form-group select,
body.pw .form-group textarea {
  background: rgba(8,19,33,0.55);
  border: 1px solid var(--pw-line);
  color: var(--pw-text);
}
body.pw .form-group input::placeholder,
body.pw .form-group textarea::placeholder { color: rgba(220,232,245,0.4); }
body.pw .form-group input:focus,
body.pw .form-group select:focus,
body.pw .form-group textarea:focus { border-color: var(--pw-accent); outline: none; }
body.pw .form-group select option { background: var(--pw-navy); color: var(--pw-text); }

.pw-contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
@media (max-width: 880px) { .pw-contact-grid { grid-template-columns: 1fr; } }
.pw-contact-card { background: var(--pw-slate); border: 1px solid var(--pw-line); border-radius: var(--radius); padding: 34px; }
.pw-contact-card h3 { color: #fff; font-size: 1.3rem; margin-bottom: 18px; }
.pw-contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--pw-line); }
.pw-contact-line:last-child { border-bottom: none; }
.pw-contact-line i { color: var(--pw-accent-2); font-size: 1.05rem; margin-top: 3px; width: 20px; text-align: center; }
.pw-contact-line b { display: block; color: #fff; font-size: 0.95rem; }
.pw-contact-line span, .pw-contact-line a { color: var(--pw-muted); font-size: 0.92rem; }
.pw-contact-line a:hover { color: var(--pw-accent-2); }
.pw-form-card { background: var(--pw-slate); border: 1px solid var(--pw-line); border-radius: var(--radius); padding: 34px; }

/* Plan-holder note callout */
.pw-note {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(91,140,192,0.1); border: 1px solid rgba(91,140,192,0.3);
  border-radius: 10px; padding: 18px 20px; margin-top: 24px;
}
.pw-note i { color: var(--pw-accent-2); font-size: 1.1rem; margin-top: 2px; }
.pw-note p { color: rgba(234,241,249,0.82); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* ---------- FOOTER (civic) ---------- */
body.pw footer { background: #07111e; border-top: 1px solid var(--pw-line); }
body.pw .footer-brand p { color: var(--pw-muted); }
body.pw .footer-col h4 { color: #fff; }
body.pw .footer-links a { color: rgba(220,232,245,0.7); }
body.pw .footer-links a:hover { color: var(--pw-accent-2); }
body.pw .footer-links a i { color: var(--pw-accent); }
body.pw .social-btn { border-color: var(--pw-line); color: rgba(234,241,249,0.8); }
body.pw .social-btn:hover { background: var(--pw-accent); border-color: var(--pw-accent); color: #fff; }
body.pw .footer-bottom { border-top: 1px solid var(--pw-line); color: var(--pw-muted); }
body.pw .footer-contact-item i { color: var(--pw-accent-2); }

/* CTA section on navy */
body.pw .cta-section { background: linear-gradient(135deg, var(--pw-slate) 0%, var(--pw-navy-2) 100%); border-top: 1px solid var(--pw-line); border-bottom: 1px solid var(--pw-line); }
body.pw .cta-section h2 { color: #fff; }
body.pw .cta-section .section-label { color: var(--pw-accent-2); }

/* Breadcrumb on navy */
body.pw .breadcrumb a { color: var(--pw-muted); }
body.pw .breadcrumb a:hover { color: var(--pw-accent-2); }
body.pw .breadcrumb span { color: var(--pw-text); }
body.pw .breadcrumb i { color: var(--pw-accent); }

/* Utility */
.pw-center { text-align: center; }
.pw-mt-sm { margin-top: 18px; }
.pw-mt { margin-top: 40px; }
