/* projects.css — Projects listing + detail styles (layered on landing.css + blogs.css) */

/* ---------- Filter tabs ---------- */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0 0 2rem;
}
.project-filter {
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: #241048;
  background: transparent;
  border: 1.5px solid rgba(36, 16, 72, .18);
  border-radius: 999px;
  padding: .55rem 1.35rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.project-filter:hover {
  border-color: rgba(46, 16, 101, .5);
}
.project-filter.is-active {
  background: #2E1065;
  color: #fff;
  border-color: #2E1065;
}

/* ---------- Grid ---------- */
.projects-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Card ---------- */
.project-card {
  display: flex;
  flex-direction: column;
  background: #FBF7EE;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px rgba(36, 16, 72, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(36, 16, 72, .14);
}

/* ---------- Media / fallback band ---------- */
.project-card-media {
  position: relative;
  height: 240px;
  background: #e9e2d3;
}
.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-card-media--fallback {
  background: var(--grad, linear-gradient(150deg, #2BBDB4 0%, #432381 100%));
}

/* ---------- Status pill (overlay on media) ---------- */
.project-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: #fff;
  color: #1c1530;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .42rem .8rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.project-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22B07D;
}
[dir="rtl"] .project-badge {
  left: auto;
  right: 1rem;
}

/* ---------- Body ---------- */
.project-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.6rem;
}
.project-cat {
  color: #0A9C97;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .55rem;
}
.project-card-body h3 {
  font-family: 'Fraunces', serif;
  color: #2E1065;
  font-size: 1.4rem;
  line-height: 1.15;
  margin: 0 0 .55rem;
}
.project-loc {
  color: #6b6580;
  font-size: .95rem;
  margin-bottom: .85rem;
}
.project-summary {
  color: #4a4560;
  font-size: .95rem;
  line-height: 1.5;
  margin: 0 0 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Metric footer ---------- */
.project-metrics {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(36, 16, 72, .1);
}
.project-metric {
  display: flex;
  flex-direction: column;
}
.project-metric-value {
  font-family: 'Fraunces', serif;
  color: #2E1065;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.1;
}
.project-metric-label {
  color: #6b6580;
  font-size: .8rem;
  margin-top: .2rem;
}

/* ---------- View link ---------- */
.project-view {
  margin-top: 1.15rem;
  color: #0A9C97;
  font-weight: 700;
  font-size: .98rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.project-view span {
  transition: transform .15s ease;
}
.project-card:hover .project-view span {
  transform: translateX(3px);
}
[dir="rtl"] .project-card:hover .project-view span {
  transform: translateX(-3px);
}

/* ---------- Empty state ---------- */
.projects-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
  padding: 4rem 1.5rem;
  background: #FBF7EE;
  border: 1px dashed rgba(46, 16, 101, .2);
  border-radius: 20px;
}
.projects-empty-art {
  line-height: 0;
}
.projects-empty-art svg {
  width: 96px;
  height: 96px;
}
.projects-empty-title {
  font-family: 'Fraunces', serif;
  color: #2E1065;
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0;
  max-width: 26ch;
}
.projects-empty-cta {
  margin-top: .3rem;
}

/* ============================================================
   DETAIL PAGE — registry record layout
   ============================================================ */
.project-detail {
  padding: 8.5rem 0 4.5rem;
}

/* ---------- Back link ---------- */
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color .2s ease;
}
.pd-back:hover { color: var(--oasis); }

/* ---------- Hero banner ---------- */
.pd-hero {
  position: relative;
  display: flex;
  min-height: 420px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(36, 16, 72, .16);
}
.pd-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.pd-hero-img--fallback {
  background: var(--grad, linear-gradient(150deg, #2BBDB4 0%, #432381 100%));
}
.pd-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(20, 10, 40, .10) 0%,
    rgba(20, 10, 40, .32) 42%,
    rgba(17, 8, 36, .86) 100%);
}
.pd-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 2.1rem 2.5rem 2.3rem;
}

/* Status pill */
.pd-status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  color: var(--accent);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .48rem .95rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}
.pd-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22B07D;
}

/* Hero text */
.pd-hero-text { margin-top: auto; }
.pd-eyebrow {
  display: block;
  margin-bottom: .7rem;
  color: #4ED8CB;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
html:lang(ar) .pd-eyebrow { letter-spacing: 0; }
.pd-title {
  margin: 0;
  font-family: var(--font-display);
  color: #fff;
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.08;
}
html:lang(ar) .pd-title { line-height: 1.3; }
.pd-loc {
  display: block;
  margin-top: .85rem;
  color: rgba(255, 255, 255, .85);
  font-size: 1.02rem;
}

/* ---------- Key figures strip ---------- */
.pd-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;                              /* container bg shows through as hairline dividers */
  margin-top: 1.6rem;
  background: rgba(36, 16, 72, .1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(36, 16, 72, .06);
}
.pd-stat {
  background: #FCF9F1;
  padding: 1.7rem 2rem;
}
.pd-stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.3vw, 2.05rem);
  line-height: 1.1;
  color: var(--oasis);
}
.pd-stat--accent .pd-stat-value { color: #12A36B; }
.pd-stat-label {
  display: block;
  margin-top: .45rem;
  color: #6b6580;
  font-size: .88rem;
}

/* ---------- Two-column body ---------- */
.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2.4rem;
  margin-top: 2.6rem;
  align-items: start;
}

.pd-section-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  color: var(--oasis);
  font-weight: 460;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}
.pd-summary {
  color: #4a4560;
  font-size: 1.02rem;
  line-height: 1.8;
}
.pd-summary + .pd-card { margin-top: 2.2rem; }

/* Cards */
.pd-card {
  border-radius: 20px;
  padding: 2rem 2.1rem 2.2rem;
}
.pd-card--light {
  background: #FBF7EE;
  box-shadow: 0 10px 30px rgba(36, 16, 72, .06);
}
.pd-card--dark {
  background: #2E1065;
  box-shadow: 0 20px 44px rgba(36, 16, 72, .28);
}
.pd-card-title {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 460;
  font-size: 1.4rem;
}
.pd-card--light .pd-card-title { color: var(--oasis); }
.pd-card--dark .pd-card-title { color: #fff; }

/* Spec rows */
.pd-specs { margin: 0; }
.pd-spec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem;
  padding: .95rem 0;
}
.pd-spec dt {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
html:lang(ar) .pd-spec dt { letter-spacing: 0; }
.pd-spec dd {
  margin: 0;
  font-weight: 600;
  text-align: end;
}
.pd-card--light .pd-spec { border-bottom: 1px solid rgba(36, 16, 72, .1); }
.pd-card--light .pd-spec:last-child { border-bottom: 0; }
.pd-card--light .pd-spec dt { color: #0A9C97; }
.pd-card--light .pd-spec dd { color: #241048; }
.pd-card--dark .pd-spec { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.pd-card--dark .pd-spec:last-child { border-bottom: 0; }
.pd-card--dark .pd-spec dt { color: #B9A6E0; }
.pd-card--dark .pd-spec dd { color: #fff; }

/* CTA */
.pd-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.6rem;
  padding: 1rem 1.4rem;
  border-radius: 12px;
  background: #16C08A;
  color: #06291D;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.pd-cta:hover { background: #22D69B; transform: translateY(-2px); }
.pd-cta span { transition: transform .2s ease; }
.pd-cta:hover span { transform: translateX(3px); }
[dir="rtl"] .pd-cta span { transform: scaleX(-1); }
[dir="rtl"] .pd-cta:hover span { transform: scaleX(-1) translateX(3px); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .project-detail { padding-top: 7rem; }
  .pd-stats { grid-template-columns: repeat(2, 1fr); }
  .pd-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}
@media (max-width: 560px) {
  .pd-hero { min-height: 340px; }
  .pd-hero-inner { padding: 1.5rem 1.4rem 1.7rem; }
  .pd-stats { grid-template-columns: 1fr; }
  .pd-card { padding: 1.6rem 1.4rem 1.8rem; }
  .pd-spec { flex-wrap: wrap; gap: .15rem; }
  .pd-spec dd { text-align: start; }
}
[dir="rtl"] .pd-spec dd { text-align: start; }
