/* ==========================================================================
   PROJECTS SECTION (SERVICES STYLE)
   ========================================================================== */

.projects-section {
  position: relative;
  width: 100%;
  background-color: #121212; /* Deep charcoal / near-black architectural tone */
  color: var(--color-white);
  padding: 4rem 0 2.5rem; 
  overflow: hidden;
  z-index: 1;
}

/* ------------------------------------------------
   TECHNICAL ARCHITECTURAL DETAILS
   ------------------------------------------------ */
.ps-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.02;
  pointer-events: none;
}

/* ------------------------------------------------
   LAYOUT CONTAINER
   ------------------------------------------------ */
.ps-container {
  position: relative;
  max-width: 1400px; /* Wider to accommodate 4 columns */
  margin: 0 auto;
  padding: 0 var(--container-padding);
  z-index: 2;
}

/* ------------------------------------------------
   EDITORIAL HEADER
   ------------------------------------------------ */
.ps-header {
  margin-bottom: 2.5rem;
}

.ps-tech-label {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-family: monospace; /* Technical feel */
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--color-off-white);
  opacity: 0.6;
}

.ps-header-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.ps-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--color-white);
}

.ps-description {
  font-size: 1.125rem;
  max-width: 800px;
  line-height: 1.6;
  color: var(--color-off-white);
  opacity: 0.8;
}

/* ------------------------------------------------
   PROJECTS GRID (ARCHITECTURAL PANELS)
   ------------------------------------------------ */
.ps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; 
  margin-bottom: 3rem;
}

.ps-card {
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

.ps-card-image-wrap {
  width: 100%;
  aspect-ratio: 4/3; /* Changed from 4/5 to 4/3 for landscape architectural photos */
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
  border-radius: 0; /* Make edges sharp */
}

.ps-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.0);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.ps-card-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--color-black);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ps-card-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start; 
  margin-top: auto; 
}

.ps-card-number {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--color-accent-warm);
  opacity: 0.8;
  margin-bottom: 0.25rem; /* Very close to title */
  transition: color 0.4s ease;
}

.ps-card-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.ps-card-title {
  font-size: 1.25rem; 
  font-weight: 500;
  transition: transform 0.4s ease;
  color: var(--color-white);
  margin: 0;
}

.ps-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
  color: var(--color-off-white);
  opacity: 0.8;
}

/* ------------------------------------------------
   HOVER STATES
   ------------------------------------------------ */
@media (hover: hover) {
  .ps-card:hover .ps-card-image {
    transform: scale(1.05);
  }
  
  .ps-card:hover .ps-card-overlay {
    opacity: 0.15;
  }
  
  .ps-card:hover .ps-card-title {
    transform: translateX(-10px);
    color: var(--color-accent-warm);
  }

  .ps-card:hover .ps-card-arrow {
    transform: translateX(-10px);
    color: var(--color-accent-warm);
  }
}

/* ------------------------------------------------
   FOOTER CTA
   ------------------------------------------------ */
.ps-footer {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.ps-cta {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 1.25rem;
  color: var(--color-white);
  text-decoration: none;
  padding-bottom: 0.5rem;
  transition: color 0.4s ease;
  position: relative;
}

.cta-line {
  height: 1px;
  width: 60px;
  background-color: rgba(255,255,255,0.2);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease;
}

.cta-arrow {
  display: inline-flex;
  transition: transform 0.4s ease;
  color: var(--color-accent-warm);
}

.ps-cta:hover {
  color: var(--color-accent-warm);
}

.ps-cta:hover .cta-line {
  width: 100px;
  background-color: var(--color-accent-warm);
}

.ps-cta:hover .cta-arrow {
  transform: translateX(-10px);
}

/* ------------------------------------------------
   RESPONSIVE
   ------------------------------------------------ */
@media (max-width: 1024px) {
  .ps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 3rem 0; /* Tightened padding */
  }
  
  .ps-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    gap: 1.5rem;
  }

  .ps-header-main {
    align-items: flex-start;
    text-align: right;
    margin-bottom: 2rem;
  }
  
  .ps-card-content {
    align-items: center; /* Center the text block */
  }

  .ps-card-title-wrap {
    justify-content: center; /* Center title and arrow */
    gap: 0.75rem;
  }

  .ps-footer {
    justify-content: center; /* Center CTA */
    margin-top: 3rem;
  }
}