/* Project layouts; content and media remain native UX Builder elements. */
.dn-project-index #main,
.dn-project-single #main {
  background: #fff;
}

.dn-project-index .header.transparent:not(.stuck) .icon-menu {
  color: #fff;
}

.dn-project-hero .text-box {
  max-width: 1060px;
}

.dn-project-hero h1 {
  margin: 0;
  line-height: 1.1;
  font-size: 1em;
}

.dn-project-list>.section-content {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

.dn-project-grid.row {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 54px;
}

.dn-project-grid.row>.col {
  padding: 0;
  max-width: 100%;
  width: 100%;
}

.dn-project-grid .portfolio-box-title {
  font-size: 18px;
  text-transform: none;
  letter-spacing: 0;
}

.dn-project-grid .portfolio-box-category {
  display: block;
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  margin: 0;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0;
  text-transform: none;
}

.dn-project-grid .box-text {
  padding: 24px;
}

.dn-project-grid a {
  display: block;
}

.dn-project-grid a:focus-visible {
  outline: 3px solid #222;
  outline-offset: 5px;
}

.dn-project-grid a:focus-visible .show-on-hover {
  opacity: 1;
  transform: none;
}

.dn-project-grid a:focus-visible .overlay {
  opacity: 1;
}

.dn-project-pagination {
  margin-top: 56px;
}

.dn-project-pagination ul {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 8px;
  margin: 0;
}

.dn-project-pagination li {
  margin: 0;
}

.dn-project-pagination a,
.dn-project-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid #e5e5e5;
  color: #333;
}

.dn-project-pagination .current,
.dn-project-pagination a:hover {
  color: #fff;
  background: #111;
  border-color: #111;
}

.dn-project-detail {
  padding: 0;
}

.dn-project-layout.row {
  width: 100%;
  max-width: none;
  margin: 0;
  align-items: stretch;
}

.dn-project-layout>.col {
  padding: 0;
}

.dn-project-layout>.dn-project-info>.col-inner {
  width: auto;
  margin: 0 9% 0 max(28px, calc((100vw - 1110px) / 2));
  padding: 64px 0;
  position: sticky;
  top: var(--dn-project-sticky-top, 90px);
}

.dn-project-info h1 {
  color: #333;
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 22px;
}

.dn-project-info .dn-project-description {
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 22px;
  color: #555;
}

.dn-project-info .dn-project-description p:last-child {
  margin-bottom: 0;
}

.dn-project-meta p {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.dn-project-meta strong {
  font-weight: 500;
  color: #333;
}

.dn-project-meta span {
  color: #666;
  overflow-wrap: anywhere;
}

.dn-project-info .dn-project-share {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  margin: 0;
  font-size: 12px;
}

.dn-project-share .share-icons-title {
  flex: 0 0 116px;
  margin: 0;
  color: #333;
  font-weight: 500;
}

.dn-project-share a {
  margin: 0;
  font-size: 14px;
}

.dn-project-gallery>.col-inner,
.dn-project-gallery .col-inner>.img,
.dn-project-gallery .img-inner {
  margin: 0;
  padding: 0;
}

.dn-project-gallery .img {
  display: block;
  width: 100% !important;
}

.dn-project-gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.dn-project-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  min-height: 64px;
}

.dn-project-navigation>div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

.dn-project-navigation>div+div {
  border-left: 1px solid #eee;
}

.dn-project-navigation a {
  color: #333;
  font-size: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.dn-project-navigation .dn-project-back {
  font-size: 24px;
}

.dn-project-navigation a:hover {
  color: #777;
}

.dn-project-navigation a:focus-visible {
  outline: 2px solid #222;
  outline-offset: 5px;
}

/* The builder needs freely selectable elements, not a pinned editing canvas. */
.uxb-iframe .dn-project-layout>.dn-project-info>.col-inner {
  position: static;
}

@media (max-width:849px) {
  .dn-project-grid.row {
    gap: 28px;
  }

  .dn-project-layout>.col {
    flex-basis: 100%;
    max-width: 100%;
  }

  .dn-project-layout>.dn-project-info>.col-inner {
    position: static;
    margin: 0;
    padding: 40px 24px;
  }

  .dn-project-info h1 {
    font-size: 28px;
  }

  .dn-project-navigation>div {
    padding: 14px 12px;
  }

  .dn-project-navigation a {
    font-size: 11px;
    gap: 6px;
  }
}

@media (max-width:549px) {
  .dn-project-grid.row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .dn-project-list>.section-content {
    padding: 0 20px;
  }

  .dn-project-grid .box-text {
    text-align: center;
    padding: 18px;
  }

  .dn-project-grid .portfolio-box-title {
    font-size: 16px;
  }
}
/* Hide project information until the specific card is hovered or keyboard-focused. */
.dn-project-grid .portfolio-box .box-text {
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.dn-project-grid .portfolio-box .overlay {
  opacity: 0;
  transition: opacity .25s ease;
}
.dn-project-grid .portfolio-box:hover .box-text,
.dn-project-grid a:focus-visible .box-text {
  opacity: 1;
  visibility: visible;
}
.dn-project-grid .portfolio-box:hover .overlay,
.dn-project-grid a:focus-visible .overlay {
  opacity: 1;
}
/* Center the smaller hover caption within the image. */
.dn-project-grid .portfolio-box .box-text,
.dn-project-grid .portfolio-box:hover .box-text,
.dn-project-grid a:focus-visible .box-text {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
}
/* Match the reference card: category, heart, inset frame and hover shadow. */
.dn-project-grid .portfolio-box {
  overflow: visible;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: box-shadow .28s ease;
}
.dn-project-grid .portfolio-box:hover,
.dn-project-grid a:focus-visible .portfolio-box {
  z-index: 2;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .24);
}
.dn-project-grid .portfolio-box::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 10px solid rgba(255, 255, 255, .12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.dn-project-grid .portfolio-box:hover::after,
.dn-project-grid a:focus-visible .portfolio-box::after {
  opacity: 1;
}
.dn-project-grid .portfolio-box::before {
  content: "♥";
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 3;
  color: rgba(255, 255, 255, .9);
  font-family: Arial, sans-serif;
  font-size: 19px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.dn-project-grid .portfolio-box:hover::before,
.dn-project-grid a:focus-visible .portfolio-box::before {
  opacity: 1;
}
@media (max-width: 549px) {
  .dn-project-grid .portfolio-box-category { bottom: 15px; font-size: 11px; }
}