/* ============================================================
   RR GROUP – projects.css
   Page-specific styles for Projects page.
   Base styles (navbar, footer, utilities) come from styles.css
   ============================================================ */

.center-line { margin-left: auto; margin-right: auto; }

/* ============================================================
   HERO
   ============================================================ */
.projects-hero {
  position: relative;
  margin-top: 147px;
  height: 380px;
  overflow: hidden;
  background: #1B3278;
}
.projects-hero-bg {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.projects-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(10,20,60,.18) 0%, rgba(10,20,60,.07) 50%, rgba(10,20,60,.22) 100%);
}

/* ============================================================
   SECTION BACKGROUNDS
   ============================================================ */
.bg-light { background: var(--light-gray); }

/* ============================================================
   SLIDER WRAPPER
   ============================================================ */
.slider-wrapper { position: relative; }

.proj-slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  /* smooth fade between pages */
  transition: opacity 0.35s ease;
}

.proj-slider.fading { opacity: 0; pointer-events: none; }

/* ============================================================
   PROJECT CARD
   ============================================================ */
.proj-card {
  background: #fff;
  border: 1px solid #e4e7ef;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.proj-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(27,50,120,.13);
}

/* Card image */
.proj-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #cdd3e0;
}
.proj-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform 0.45s ease;
}
.proj-card:hover .proj-card-img img { transform: scale(1.06); }

/* Title bar overlay */
.proj-card-title-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--navy);
  padding: 10px 14px;
}
.proj-card-title-bar h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}
.proj-card-title-bar p {
  font-size: 0.72rem;
  color: rgba(255,255,255,.78);
  text-align: center;
  line-height: 1.4;
}

/* Card body */
.proj-card-body {
  padding: 16px 14px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  flex: 1;
}
.proj-meta-item { display: flex; flex-direction: column; gap: 2px; }
.proj-meta-item .meta-icon {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.proj-meta-item .meta-icon img,
.proj-meta-item .meta-icon i {
  width: 18px; height: 18px;
  object-fit: contain;
  color: var(--navy); font-size: 0.9rem;
  flex-shrink: 0;
}
.proj-meta-item .meta-label {
  font-size: 0.68rem;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.proj-meta-item .meta-value {
  font-size: 0.8rem;
  color: #222;
  font-weight: 500;
  line-height: 1.4;
}
.proj-meta-item.full-col { grid-column: 1 / -1; }

/* ============================================================
   SLIDER CONTROLS
   ============================================================ */
.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}
.slider-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.slider-btn:hover {
  background: #fff;
  color: var(--navy);
  transform: scale(1.08);
}
.slider-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}



/* ============================================================
   PROJECT DETAIL POPUP
   ============================================================ */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(10,18,50,.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.popup-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.popup-box {
  background: #fff;
  border-radius: 6px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(10,18,50,.35);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(.22,.68,0,1.2), opacity 0.3s ease;
  opacity: 0;
}
.popup-overlay.open .popup-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.popup-close {
  position: absolute;
  top: 14px; right: 18px;
  width: 36px; height: 36px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}
.popup-close:hover { background: var(--red); transform: scale(1.1) rotate(90deg); }

.popup-img-wrap {
  height: 320px;
  overflow: hidden;
  background: #c8d0e0;
}
.popup-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

.popup-body { padding: 28px 32px 32px; }

.popup-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.popup-address {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-bottom: 24px;
  line-height: 1.6;
}

.popup-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 28px;
  border-top: 1px solid #e8eaf0;
  padding-top: 20px;
}
.popup-meta-item { display: flex; flex-direction: column; gap: 3px; }
.popup-meta-item .pm-label {
  font-size: 0.7rem;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 5px;
}
.popup-meta-item .pm-label i { color: var(--navy); font-size: 0.8rem; }
.popup-meta-item .pm-value {
  font-size: 0.9rem;
  color: #222;
  font-weight: 500;
  line-height: 1.45;
}
.popup-meta-item.span2 { grid-column: span 2; }
.popup-meta-item.span3 { grid-column: span 3; }

/* ============================================================
   RESPONSIVE – Tablet
   ============================================================ */
@media (max-width: 900px) {
  .projects-hero { height: 260px; }
  .proj-slider   { grid-template-columns: repeat(2, 1fr); }
  .proj-grid     { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .popup-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .popup-meta-item.span2,
  .popup-meta-item.span3 { grid-column: span 2; }
}

/* ============================================================
   RESPONSIVE – Mobile
   ============================================================ */
@media (max-width: 600px) {
  .projects-hero { height: 200px; }
  .proj-slider   { grid-template-columns: 1fr; }
  .proj-grid     { grid-template-columns: 1fr; }
  .popup-img-wrap { height: 220px; }
  .popup-body    { padding: 20px 18px 24px; }
  .popup-name    { font-size: 1.25rem; }
  .popup-meta-grid { grid-template-columns: 1fr 1fr; }
}
