/* ═══════════════════════════════════════════════════════
   ASAS Contracting — Residential Projects Section
   File: assets/css/residential-projects.css
   Used in: projects.html
═══════════════════════════════════════════════════════ */

/* ── SECTION ── */
.residential-section {
  padding: 80px 0 100px;
  background: #f5f5f5;
  border-top: 1px solid #e8e0d4;
}

.residential-section .section-title__tagline {
  display: block;
  margin-bottom: 8px;
}

.residential-section .section-title__title {
  margin-bottom: 48px;
}

/* ── CARD ── */
.res-card-wrap {
  margin-bottom: 30px;
}

.res-card {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.res-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
}

/* ── IMAGE: edge-to-edge rectangle ── */
.res-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #e8e0d4;
}

.res-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.res-card:hover .res-card__img img {
  transform: scale(1.05);
}

/* ── HOVER OVERLAY ── */
.res-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(150, 112, 42, 0.0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.res-card:hover .res-card__overlay {
  background: rgba(150, 112, 42, 0.18);
}

.res-card__overlay-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.res-card:hover .res-card__overlay-icon {
  opacity: 1;
  transform: scale(1);
}

.res-card__overlay-icon i {
  font-size: 18px;
  color: #96702a;
}

/* ── CARD BODY ── */
.res-card__body {
  padding: 20px 22px 22px;
}

.res-card__title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1612;
  margin: 0 0 4px;
  line-height: 1.3;
}

.res-card__location {
  font-size: 13px;
  color: #96702a;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ── LIGHTBOX ── */
#res-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#res-lightbox.active {
  display: flex;
}

#res-lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.90);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

#res-lb-wrap {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 780px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: lbFadeIn 0.25s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

#res-lb-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0,0,0,0.45);
  border: none;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#res-lb-close:hover { background: rgba(0,0,0,0.7); }

#res-lb-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1612;
  flex-shrink: 0;
}

#res-lb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── NAVIGATION ARROWS ── */
#res-lb-prev,
#res-lb-next {
  position: absolute;
  top: calc(50% - 60px);
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#res-lb-prev { left: 12px; }
#res-lb-next { right: 12px; }
#res-lb-prev:hover,
#res-lb-next:hover { background: rgba(150,112,42,0.7); }

/* ── INFO PANEL ── */
#res-lb-info {
  padding: 24px 28px 28px;
  flex-shrink: 0;
}

#res-lb-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1612;
  margin: 0 0 4px;
}

#res-lb-location {
  font-size: 13px;
  font-weight: 600;
  color: #96702a;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

#res-lb-desc {
  font-size: 14px;
  color: #6b6560;
  line-height: 1.75;
  margin: 0;
}

/* ── COUNTER ── */
#res-lb-counter {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .residential-section {
    padding: 60px 0 80px;
  }
  #res-lb-wrap {
    width: 96vw;
    max-height: 94vh;
  }
  #res-lb-info {
    padding: 18px 20px 22px;
  }
  #res-lb-title { font-size: 17px; }
  #res-lb-prev { left: 6px; }
  #res-lb-next { right: 6px; }
}

@media (max-width: 480px) {
  #res-lb-prev,
  #res-lb-next {
    width: 38px;
    height: 38px;
    font-size: 22px;
    top: calc(50% - 50px);
  }
  #res-lb-desc { font-size: 13px; }
}
