/* ============================================================
   PROJECTS LANDING + DETAIL — scoped under .pp
   ============================================================ */

.pp { font-family: var(--ip-font-body); color: var(--ip-charcoal); background: var(--ip-white); }
.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp img { max-width: 100%; display: block; }
.pp a { color: inherit; text-decoration: none; }

.pp-container {
  width: 100%;
  max-width: var(--ip-max);
  margin: 0 auto;
  padding: 0 24px;
}
.pp-section { padding: var(--ip-pad-section) 0; }
.pp-section--grey { background: var(--ip-concrete); }

/* ============================================================
   PILLS / FILTERS
   ============================================================ */
.pp-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 56px;
}
.pp-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  font-family: var(--ip-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ip-charcoal);
  background: var(--ip-concrete);
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s var(--ip-ease);
}
.pp-pill:hover { background: var(--ip-white); border-color: var(--ip-orange); color: var(--ip-orange); }
.pp-pill.is-active { background: var(--ip-navy); color: var(--ip-white); border-color: var(--ip-navy); }

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.pp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
@media (max-width: 1024px) { .pp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .pp-grid { grid-template-columns: 1fr; } }

.pp-card {
  background: var(--ip-white);
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ip-ease), box-shadow .3s var(--ip-ease), border-color .3s var(--ip-ease);
}
.pp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ip-shadow-lift);
  border-color: rgba(242,122,26,.3);
}

.pp-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ip-concrete);
}
.pp-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ip-ease);
}
.pp-card-media-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ip-mute-light);
}
.pp-card-media-placeholder svg { width: 56px; height: 56px; }
.pp-card:hover .pp-card-media img { transform: scale(1.06); }

.pp-card-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.pp-card-tag {
  display: inline-block;
  padding: 5px 12px;
  font-family: var(--ip-font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ip-white);
  background: var(--ip-orange);
  border-radius: 4px;
}
.pp-card-status {
  display: inline-block;
  padding: 5px 10px;
  font-family: var(--ip-font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}
.pp-card-status--completed { background: rgba(30,126,72,.92); color: var(--ip-white); }
.pp-card-status--ongoing   { background: rgba(15,42,68,.92); color: var(--ip-white); }
.pp-card-status--planned   { background: rgba(255,255,255,.92); color: var(--ip-navy); }

.pp-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pp-card-title {
  font-family: var(--ip-font-sub);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ip-navy);
  margin: 0;
}
.pp-card-title a { color: inherit; transition: color .2s var(--ip-ease); }
.pp-card-title a:hover { color: var(--ip-orange); }
.pp-card-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ip-font-body);
  font-size: 13px;
  color: var(--ip-mute);
}
.pp-card-loc svg { width: 14px; height: 14px; color: var(--ip-orange); }
.pp-card-desc {
  font-family: var(--ip-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ip-mute);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--ip-font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ip-orange);
}
.pp-card-link svg { transition: transform .3s var(--ip-ease); }
.pp-card:hover .pp-card-link svg { transform: translateX(4px); }

/* ============================================================
   STATE
   ============================================================ */
.pp-state {
  grid-column: 1 / -1;
  padding: 70px 24px;
  text-align: center;
  color: var(--ip-mute);
  font-family: var(--ip-font-body);
  font-size: 16px;
}
.pp-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--ip-line);
  border-top-color: var(--ip-orange);
  border-radius: 50%;
  animation: pp-spin 0.9s linear infinite;
}
@keyframes pp-spin { to { transform: rotate(360deg); } }

/* ============================================================
   PROJECT DETAIL (PD-)
   ============================================================ */
.pd-shell {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 960px) { .pd-shell { grid-template-columns: 1fr; gap: 40px; } }

.pd-text .ip-h2 { margin-bottom: 22px; }
.pd-text p {
  font-family: var(--ip-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ip-mute);
  margin: 0 0 16px;
}
.pd-text h3 {
  font-family: var(--ip-font-sub);
  font-size: 22px;
  font-weight: 600;
  color: var(--ip-navy);
  margin: 32px 0 14px;
}
.pd-text ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.pd-text ul li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-family: var(--ip-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ip-charcoal);
}
.pd-text ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ip-orange);
}

/* Info card (sidebar) */
.pd-info {
  position: sticky;
  top: 110px;
  background: var(--ip-white);
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-radius-card);
  padding: 28px;
  box-shadow: var(--ip-shadow-card);
}
.pd-info h4 {
  font-family: var(--ip-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ip-navy);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ip-orange);
}
.pd-info-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.pd-info-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ip-line);
}
.pd-info-list li:last-child { border-bottom: 0; }
.pd-info-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(242,122,26,.1);
  color: var(--ip-orange);
  display: grid;
  place-items: center;
}
.pd-info-icon svg { width: 16px; height: 16px; }
.pd-info-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pd-info-body strong {
  font-family: var(--ip-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ip-mute);
}
.pd-info-body span {
  font-family: var(--ip-font-body);
  font-size: 14.5px;
  color: var(--ip-charcoal);
  word-break: break-word;
  line-height: 1.45;
}

/* Gallery */
.pd-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}
@media (max-width: 760px) { .pd-gallery { grid-template-columns: repeat(2, 1fr); } }
.pd-gallery a {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ip-concrete);
  transition: transform .25s var(--ip-ease), box-shadow .25s var(--ip-ease);
}
.pd-gallery a:hover {
  transform: translateY(-3px);
  box-shadow: var(--ip-shadow-card);
}
.pd-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Status badge inside hero */
.pd-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pd-hero-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-family: var(--ip-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
}
.pd-hero-status--completed { background: rgba(30,126,72,.92); color: var(--ip-white); }
.pd-hero-status--ongoing   { background: rgba(242,122,26,.92); color: var(--ip-white); }
.pd-hero-status--planned   { background: rgba(255,255,255,.92); color: var(--ip-navy); }

.pd-hero-loc {
  font-family: var(--ip-font-body);
  font-size: 14px;
  color: rgba(255,255,255,.85);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pd-hero-loc svg { width: 16px; height: 16px; color: var(--ip-orange); }

/* ==========================================================================
   Nepal project map — Leaflet marker + popup styles.
   Mirrors the definitions in home-layout.css so the map renders correctly on
   the Projects page, which does not load home-layout.css.
   ========================================================================== */

/* Custom markers. */
.nepal-marker-wrap {
  background: transparent;
  border: 0;
}

.nepal-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.nepal-marker__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--marker-color, #F27A1A);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.nepal-marker:hover .nepal-marker__dot {
  transform: scale(1.18);
}

.nepal-marker__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(46, 58, 70, 0.35);
  animation: nepal-marker-pulse 1.8s ease-out infinite;
}

@keyframes nepal-marker-pulse {
  0%   { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Popup styling. */
.nepal-popup-wrap .leaflet-popup-content-wrapper {
  background: #ffffff;
  border-top: 4px solid var(--brand-primary, #F27A1A);
  border-radius: 6px;
  padding: 0;
  box-shadow: 0 10px 24px rgba(15, 42, 68, 0.18);
}

.nepal-popup-wrap .leaflet-popup-content {
  margin: 0;
  width: auto !important;
}

.nepal-popup {
  padding: 16px 18px;
  font-family: var(--r-font-body, "Inter", sans-serif);
  font-size: 13px;
  color: var(--r-navy-900, #0F2A44);
  animation: nepal-popup-in 0.2s ease-out;
}

@keyframes nepal-popup-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nepal-popup__tag {
  display: inline-block;
  padding: 3px 9px;
  background: var(--brand-primary, #F27A1A);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 3px;
  margin-bottom: 8px;
}

.nepal-popup__title {
  margin: 0 0 10px;
  font-family: var(--r-font-head, "Poppins", sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--r-navy-900, #0F2A44);
}

.nepal-popup__rows {
  margin: 0 0 12px;
}

.nepal-popup__row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid #eef0f3;
}

.nepal-popup__row:last-child {
  border-bottom: 0;
}

.nepal-popup__row dt {
  font-weight: 600;
  color: var(--r-grey-700, #4A5560);
  font-size: 12px;
}

.nepal-popup__row dd {
  margin: 0;
  color: var(--r-navy-900, #0F2A44);
  font-size: 13px;
}

.nepal-popup__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
}

.nepal-popup__status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.nepal-popup__status--completed {
  background: rgba(20, 108, 67, 0.12);
  color: #146c43;
}

.nepal-popup__status--ongoing {
  background: rgba(242, 122, 26, 0.15);
  color: #b25f10;
}

.nepal-popup__link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-primary, #F27A1A);
  text-decoration: none;
}

.nepal-popup__link:hover {
  color: var(--brand-primary-hover, #D9650C);
}
