.works-page{
  max-width:1100px;
  margin:40px auto 70px;
  padding:0 22px;
  text-align:center;
}

.works-page h1{
  color:#20384d;
  font-size:42px;
  margin:0 0 36px;
}

.works-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:34px;
}

.work-card{
  position:relative;
  background:#fff;
  border:1px solid #dfe7ee;
  border-radius:22px;
  padding:22px 22px 58px;
  box-shadow:0 14px 34px rgba(0,0,0,.09);
  min-height:360px;
}

.work-card img{
  width:100%;
  height:210px;
  object-fit:cover;
  border-radius:16px;
  display:block;
}

.work-card h2{
  color:#111;
  font-size:28px;
  margin:34px 0 0;
}

.work-card a{
  position:absolute;
  right:50%;
  bottom:-22px;
  transform:translateX(50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:170px;
  padding:13px 24px;
  border-radius:999px;
  background:#20384d;
  color:#fff;
  font-weight:800;
  box-shadow:0 8px 18px rgba(32,56,77,.28);
}

@media(max-width:900px){
  .works-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:600px){
  .works-grid{
    grid-template-columns:1fr;
  }

  .works-page h1{
    font-size:34px;
  }
}

/* ===== Work card button notch ===== */

.work-card::after{
  content:"";
  position:absolute;
  bottom:-1px;
  left:50%;
  transform:translateX(-50%);
  width:220px;
  height:42px;
  background:#fff;
  border-radius:55px 55px 0 0;
  box-shadow:
    0 -3px 7px rgba(0,0,0,.12);
  z-index:1;
}

.work-card a{
  z-index:2;
  bottom:-25px;
  min-width:210px;
  padding:15px 28px;
  font-size:19px;
  border-radius:999px;
}


/* ===== Work card button notch final ===== */

.work-card{
  overflow:visible;
}

.work-card::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-2px;
  transform:translateX(-50%);
  width:290px;
  height:58px;
  background:#fff;
  border-radius:70px 70px 0 0;
  box-shadow:
    0 -5px 10px rgba(0,0,0,.12),
    inset 0 3px 3px rgba(0,0,0,.03);
  z-index:1;
}

.work-card a{
  left:50%;
  right:auto;
  bottom:-31px;
  transform:translateX(-50%);
  width:264px;
  min-width:0;
  padding:17px 24px;
  font-size:19px;
  z-index:2;
}


/* ===== Button notch position fix ===== */

.work-card::after{
  bottom:-20px;
  height:64px;
}

.work-card a{
  bottom:-39px;
}

.work-card{
  margin-bottom:44px;
}


/* ===== Work card reference overlap style ===== */

.work-card{
  position:relative;
  overflow:visible;
  padding:22px 22px 0;
  margin-bottom:70px;
  text-align:center;
}

.work-card::after{
  display:none !important;
}

.work-card h2{
  position:relative;
  z-index:1;
  margin:28px 0 24px;
}

.work-card a{
  position:relative;
  z-index:1;

  left:auto;
  right:auto;
  bottom:auto;
  transform:none;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:260px;
  width:auto;
  padding:17px 34px;

  margin:0 auto -30px;

  border-radius:999px;
}


/* ===== Exact absolute overlap button ===== */

.work-card{
  position:relative;
  overflow:visible;
  padding-bottom:58px;
  margin-bottom:70px;
}

.work-card::after{
  display:none !important;
}

.work-card a{
  position:absolute;
  top:calc(100% - 2em);
  left:50%;
  right:auto;
  bottom:auto;
  transform:translateX(-50%);
  z-index:2;

  min-width:260px;
  padding:17px 34px;
  margin:0;
}


/* ===== Real button dent ===== */

.work-card::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:-1px;
  transform:translateX(-50%);
  width:245px;
  height:62px;
  background:#fff;
  border-radius:70px 70px 0 0;
  border-top:1px solid #dfe7ee;
  box-shadow:0 -4px 12px rgba(0,0,0,.12);
  z-index:1;
}

.work-card a{
  z-index:2;
}


/* final clean card overlap like reference */

.work-card{
  position:relative;
  overflow:visible;
  padding:22px 22px 64px;
  margin-bottom:74px;
}

.work-card::before,
.work-card::after{
  display:none !important;
}

.work-card a{
  position:absolute;
  top:calc(100% - 2em);
  left:50%;
  right:auto;
  bottom:auto;
  transform:translateX(-50%);
  z-index:2;
  margin:0;
  min-width:240px;
}


/* ===== CANVAS DENT CARD ===== */

.work-card{
  position:relative;
  overflow:visible;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:22px 22px 58px;
  margin-bottom:75px;
}

.work-card::before,
.work-card::after{
  display:none !important;
}

.work-card-dent-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
  overflow:visible;
}

.work-card > *:not(.work-card-dent-canvas){
  position:relative;
  z-index:1;
}

.work-card a{
  position:absolute;
  top:calc(100% - 2em);
  left:50%;
  right:auto;
  bottom:auto;
  transform:translateX(-50%);
  z-index:2;
  margin:0;
  min-width:240px;
}


/* ===== CANVAS DENT BUTTON LAYER FIX ===== */

.work-card-dent-canvas{
  z-index:0 !important;
}

.work-card > *:not(.work-card-dent-canvas){
  z-index:1;
}

.work-card a{
  z-index:10 !important;
  top:calc(100% - 2.05em);
}


/* ===== Clean works card final ===== */

.work-card{
  background:#fff !important;
  border:1px solid #dfe7ee !important;
  box-shadow:0 14px 34px rgba(0,0,0,.09) !important;
  border-radius:22px;
  padding:22px 22px 34px;
  margin-bottom:0;
}

.work-card::before,
.work-card::after,
.work-card-dent-canvas{
  display:none !important;
}

.work-card a{
  position:static !important;
  transform:none !important;
  margin:24px auto 0;
  min-width:210px;
  padding:14px 30px;
}

/* ===== Works card clean layout ===== */

.work-card h2{
  display:none !important;
}

.work-card{
  padding:22px 22px 28px !important;
}

.work-card a{
  position:static !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;

  transform:none !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;

  margin:22px auto 0 !important;
  min-width:210px;
  padding:14px 30px;

  border-radius:999px;
}


/* =========================================
   MOBILE WORKS GRID - 2 COLUMNS FINAL
   ========================================= */

@media (max-width:620px){

  .works-page{
    width:100% !important;
    max-width:none !important;
    margin:24px auto 45px !important;
    padding:0 10px !important;
  }

  .works-page h1{
    font-size:32px !important;
    margin:0 0 22px !important;
  }

  .works-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .work-card{
    min-width:0 !important;
    min-height:0 !important;
    padding:10px 10px 14px !important;
    border-radius:16px !important;
  }

  .work-card img{
    width:100% !important;
    height:150px !important;
    object-fit:contain !important;
    border-radius:10px !important;
  }

  .work-card a{
    width:100% !important;
    min-width:0 !important;
    margin:12px auto 0 !important;
    padding:11px 6px !important;
    font-size:12px !important;
    line-height:1.2 !important;
    border-radius:12px !important;
  }

}

@media (max-width:360px){

  .works-grid{
    gap:8px !important;
  }

  .work-card{
    padding:8px 8px 12px !important;
  }

  .work-card img{
    height:125px !important;
  }

  .work-card a{
    font-size:11px !important;
  }

}

/* =========================================
   MOBILE RELATED WORKS - 2 COLUMNS
   ========================================= */

@media (max-width:620px){

  .related-works-section{
    padding:24px 10px !important;
  }

  .related-works-section h2{
    font-size:28px !important;
    margin:0 0 22px !important;
  }

  .related-works-grid{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .related-work-card{
    min-width:0 !important;
    padding:8px !important;
    border-radius:14px !important;
  }

  .related-work-card img{
    width:100% !important;
    height:130px !important;
    object-fit:contain !important;
    border-radius:9px !important;
  }

  .related-work-card strong{
    font-size:13px !important;
    line-height:1.4 !important;
    margin:8px 0 6px !important;
  }

  .related-work-card span{
    width:100% !important;
    padding:9px 5px !important;
    font-size:11px !important;
    line-height:1.2 !important;
    border-radius:999px !important;
  }

}

@media (max-width:360px){

  .related-works-grid{
    gap:7px !important;
  }

  .related-work-card img{
    height:115px !important;
  }

}
