/**
 * Desenvolvido por: DriveWeb | Rodrigo Soares | © DriveWeb — Todos os direitos reservados
 * https://driveweb.pt · contacto@driveweb.pt · WhatsApp +351 913 671 493
 */
/* DW Portfolio — P2 / SPEC-P0 */

.dwp {
  margin: 50px 0 0;
}

.dwp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(18px, 2.4vw, 36px);
  row-gap: clamp(34px, 4vw, 56px);
  align-items: start;
}

.dwp-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  min-width: 0;
}

.dwp-ph {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #E6DDD0;
}

.dwp-ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.dwp-card:hover .dwp-ph img,
.dwp-card:focus-visible .dwp-ph img {
  transform: scale(1.035);
}

.dwp-card:focus-visible {
  outline: 2px solid #794530;
  outline-offset: 4px;
}

.dwp-n {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(11, 36, 57, .72);
  color: #F1ECE4;
  font: 500 10px/1 var(--ns-sans, Montserrat, system-ui, sans-serif);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.dwp-cap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  min-width: 0;
}

.dwp-t {
  font-family: var(--ns-serif, "EB Garamond", Georgia, serif);
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--ns-navy, #0B2439);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dwp-m {
  font-family: var(--ns-sans, Montserrat, system-ui, sans-serif);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ns-muted, #7a746c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dwp-vazio {
  font-family: var(--ns-serif, "EB Garamond", Georgia, serif);
  font-size: 1.3rem;
  color: var(--ns-navy, #0B2439);
}

html.dwp-open,
html.dwp-open body {
  overflow: hidden;
}

.dwp-lb[hidden] {
  display: none;
}

.dwp-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  background: #0B2439;
  color: #F1ECE4;
}

.dwp-lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
  min-height: 0;
  min-width: 0;
  touch-action: pan-y;
}

.dwp-lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.dwp-lb-prev,
.dwp-lb-next {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid rgba(241, 236, 228, .35);
  color: #F1ECE4;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.dwp-lb-prev {
  left: 14px;
}

.dwp-lb-next {
  right: 14px;
}

.dwp-lb-prev:hover,
.dwp-lb-next:hover,
.dwp-lb-prev:focus-visible,
.dwp-lb-next:focus-visible {
  border-color: #D9A97F;
  color: #D9A97F;
}

.dwp-lb-count {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  font: 500 11px/1 var(--ns-sans, Montserrat, system-ui, sans-serif);
  letter-spacing: .24em;
  color: #D9A97F;
}

.dwp-lb-side {
  padding: 64px 36px 32px;
  overflow-y: auto;
  border-left: 1px solid rgba(241, 236, 228, .12);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dwp-lb-t {
  font-family: var(--ns-serif, "EB Garamond", Georgia, serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  color: #F1ECE4;
}

.dwp-lb-m {
  font-family: var(--ns-sans, Montserrat, system-ui, sans-serif);
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #D9A97F;
  margin: 0;
}

.dwp-lb-d p {
  font-family: var(--ns-sans, Montserrat, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.75;
  color: rgba(241, 236, 228, .86);
  margin: 0 0 12px;
}

.dwp-lb-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.dwp-lb-thumbs button {
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
  opacity: .6;
}

.dwp-lb-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dwp-lb-thumbs button[aria-current="true"],
.dwp-lb-thumbs button:hover {
  opacity: 1;
  border-color: #D9A97F;
}

.dwp-lb-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #F1ECE4;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.dwp-lb-close:hover,
.dwp-lb-close:focus-visible {
  color: #D9A97F;
}

.dwp-lb button:focus-visible {
  outline: 2px solid #D9A97F;
  outline-offset: 2px;
}

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

  .dwp-lb {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 62vh) minmax(0, 1fr);
  }

  .dwp-lb-stage {
    padding: 52px 12px 36px;
  }

  .dwp-lb-prev,
  .dwp-lb-next {
    width: 40px;
    height: 40px;
  }

  .dwp-lb-prev {
    left: 6px;
  }

  .dwp-lb-next {
    right: 6px;
  }

  .dwp-lb-side {
    border-left: 0;
    border-top: 1px solid rgba(241, 236, 228, .12);
    padding: 20px 18px 24px;
  }

  .dwp-lb-t {
    font-size: 1.5rem;
  }

  .dwp-lb-thumbs {
    grid-template-columns: repeat(5, 1fr);
    margin-top: 8px;
  }
}

@media (max-width: 560px) {
  .dwp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dwp-ph img {
    transition: none;
  }

  .dwp-card:hover .dwp-ph img,
  .dwp-card:focus-visible .dwp-ph img {
    transform: none;
  }
}

/* 1.0.1: o tema do site pinta h2 e p a azul-escuro; dentro da galeria o texto tem de ser claro */
/* 1.0.2: !important necessário porque o site força body.ns h2 a azul-escuro com !important */
.dwp-lb .dwp-lb-t{color:#F1ECE4 !important;font-family:var(--ns-serif, "EB Garamond", Georgia, serif);font-size:2rem;font-weight:400;line-height:1.15;margin:0;letter-spacing:0;text-transform:none}
.dwp-lb .dwp-lb-m{color:#D9A97F;margin:0}
.dwp-lb .dwp-lb-d p{color:rgba(241,236,228,.86);margin:0 0 12px}
@media (max-width: 900px){.dwp-lb .dwp-lb-t{font-size:1.5rem}}
