@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

.latest-works{
background:#f5f5f5;
font-family:'Roboto', sans-serif;
}

/* section */

.latest-works{
padding:80px 0;
}

.latest-pill{
display:inline-flex;
align-items:center;
padding:6px 14px;
border-radius:999px;
background:#e6eadf;
font-size:11px;
letter-spacing:1px;
text-transform:uppercase;
color:#3f4f3c;
font-family:'Poppins', sans-serif;
margin:0 auto;
}

.plan-title {
text-align: center;
font-size: clamp(30px, 4.5vw, 52px);
letter-spacing: 1px;
text-transform: none;
margin: 16px 0 28px;
font-weight: 500;
color:#3a5a3a;
font-family:'Poppins', sans-serif;
}

.latest-works .work-cta{
display:inline-flex;
align-items:center;
justify-content:center;
padding:10px 24px;
border-radius:999px;
background:#3f4f3c;
color:#fff;
text-decoration:none;
font-size:12px;
letter-spacing:1px;
text-transform:uppercase;
font-family:'Poppins', sans-serif;
margin-top:26px;
gap:8px;
transition:background 0.25s ease, transform 0.25s ease;
}
.latest-works .work-cta::after {
   content:"\2192";  
   
}

.latest-works .work-cta:hover{
background:#1f2f1f;
transform:translateY(-1px);
}

.latest-works .row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.latest-works .row > [class*="col-"]{
  width: 100%;
  max-width: none;
  padding: 0;
}

/* ==========================================================================
   Project Category Card Structure & Interactions
   ========================================================================== */

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  overflow: hidden;
  height: 380px;
  cursor: pointer;
  background: #233921;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
  box-shadow: 0 14px 36px rgba(18, 32, 16, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.1);
  contain: layout paint;
}

.work-card:focus-visible {
  outline: 3px solid rgba(120, 175, 105, 0.6);
  outline-offset: 4px;
}

/* Media: Project Photo */
.work-card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

/* Subtle default gradient layer on image so photo stays visible but bottom text is readable */
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 24, 10, 0.72) 0%,
    rgba(12, 24, 10, 0.35) 35%,
    transparent 65%
  );
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Shared typography elements */
.work-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #a8d999;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 4px;
}

.work-title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
}

/* Base Default Caption (Visible on desktop before hover) */
.work-caption-base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 28px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: #ffffff;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-caption-main {
  min-width: 0;
}

.work-caption-base .work-title {
  font-size: 20px;
}

.work-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.work-loc {
  font-size: 12.5px;
  color: #d2e4cb;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.work-loc i {
  color: #a8d999;
  font-size: 12px;
}

.work-arrow {
  font-size: 24px;
  line-height: 1;
  color: #ffffff;
  transition: transform 0.3s ease;
}

/* Translucent Overlay (Reveals on desktop hover with translucent gradient; subtle caption on phone) */
.work-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 30px;
  color: #ffffff;
  /* Translucent gradient - Keeps project photo visible underneath at all times */
  background: linear-gradient(
    to top,
    rgba(10, 22, 9, 0.92) 0%,
    rgba(10, 22, 9, 0.72) 48%,
    rgba(10, 22, 9, 0.22) 78%,
    transparent 100%
  );
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-overlay .work-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.work-desc {
  font-size: 14px;
  line-height: 1.55;
  color: #e0eed8;
  margin: 0 0 14px 0;
  max-width: 500px;
  font-family: 'Roboto', sans-serif;
}

/* Click / Tap Prompt */
.work-prompt {
  display: inline-flex;
  align-items: center;
}

.prompt-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #b9e8a7;
  font-family: 'Poppins', sans-serif;
  transition: gap 0.25s ease, color 0.25s ease;
}

.prompt-text i,
.prompt-text .arrow {
  font-size: 15px;
  transition: transform 0.25s ease;
}

.prompt-mobile {
  display: none;
}

/* Desktop Hover Interaction */
@media (hover: hover) and (pointer: fine) {
  .work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(14, 28, 12, 0.25);
    border-color: rgba(168, 217, 153, 0.3);
  }

  .work-card:hover .work-card__media {
    transform: scale(1.05);
  }

  .work-card:hover .work-caption-base {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
  }

  .work-card:hover .work-overlay {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .work-card:hover .prompt-desktop {
    color: #ffffff;
    gap: 12px;
  }

  .work-card:hover .prompt-desktop i {
    transform: translateX(4px);
  }
}

/* ==========================================================================
   Phone Behavior (Touch Devices / Mobile Viewports)
   ========================================================================== */
@media (max-width: 768px) {
  .latest-works {
    padding: 56px 0;
  }

  .latest-works .row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-card {
    height: 430px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(18, 32, 16, 0.12);
  }

  .section-title .plan-title {
    font-size: 36px;
    letter-spacing: 0.5px;
  }

  /* Hide default single-line caption on phone */
  .work-caption-base {
    display: none !important;
  }

  /* Translucent caption seamlessly anchored to the bottom and faded into the garden photo */
  .work-overlay {
    position: absolute;
    inset: auto;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    border-radius: 0;
    padding: 54px 22px 22px 22px;
    background: linear-gradient(
      to top,
      rgba(8, 18, 7, 0.94) 0%,
      rgba(8, 18, 7, 0.88) 38%,
      rgba(8, 18, 7, 0.65) 66%,
      rgba(8, 18, 7, 0.22) 88%,
      transparent 100%
    );
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
  }

  .work-tag {
    font-size: 10px;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }

  .work-overlay .work-title {
    font-size: 17.5px;
    margin-bottom: 4px;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  }

  .work-desc {
    font-size: 12.5px;
    line-height: 1.45;
    color: #dcebd4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }

  .prompt-desktop {
    display: none;
  }

  .prompt-mobile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #a4deb4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }

  .prompt-mobile i {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .work-card {
    height: 410px;
  }

  .work-overlay {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 18px 18px 18px;
  }

  .work-overlay .work-title {
    font-size: 16.5px;
  }

  .work-desc {
    font-size: 12px;
    margin-bottom: 8px;
  }
}

/* Standalone Touch-Device (hover: none) Safeguard */
@media (hover: none) and (pointer: coarse) {
  .work-caption-base {
    display: none;
  }

  .work-overlay {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .prompt-desktop {
    display: none;
  }

  .prompt-mobile {
    display: inline-flex;
  }
}
