.portfolio-showcase {
  padding-top: 50px;
}

.portfolio-showcase .section-title {
  margin-bottom: 18px;
}

.portfolio-kicker {
  color: #b83030;
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.portfolio-showcase-copy {
  color: #555555;
  max-width: 760px;
  margin: 0 auto;
}

.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 24px auto 0;
}

.portfolio-stat {
  border: 1px solid #e5e5e5;
  padding: 15px 18px;
  background: #ffffff;
}

.portfolio-stat strong {
  display: block;
  color: #252525;
  font-size: 26px;
  line-height: 1;
}

.portfolio-stat span {
  color: #707070;
  display: block;
  font-size: 13px;
  margin-top: 7px;
}

.portfolio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  margin-bottom: 28px;
  text-align: center;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.portfolio-filter {
  border: 1px solid #dedede;
  background: #ffffff;
  color: #555555;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 14px;
  transition: 0.2s ease;
}

.portfolio-filter:hover,
.portfolio-filter.is-active {
  background: #414141;
  border-color: #414141;
  color: #ffffff;
}

.portfolio-search {
  max-width: 320px;
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.portfolio-search i {
  color: #777777;
  left: 14px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.portfolio-search input {
  border: 1px solid #dedede;
  color: #333333;
  height: 42px;
  padding: 8px 14px 8px 40px;
  width: 100%;
}

.portfolio-loading {
  border: 1px solid #e2e2e2;
  color: #555555;
  font-size: 15px;
  font-weight: 700;
  margin: 0 auto 24px;
  max-width: 760px;
  padding: 22px;
  text-align: center;
}

.portfolio-featured-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  background: #f7f7f7;
  border: 0;
  cursor: pointer;
  display: block;
  min-height: 280px;
  overflow: hidden;
  padding: 0;
  position: relative;
  text-align: left;
  width: 100%;
}

.project-card img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  width: 100%;
}

.project-card:hover img,
.project-card:focus img {
  transform: scale(1.045);
}

.project-card::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.78) 100%);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.project-card-content {
  bottom: 0;
  color: #ffffff;
  left: 0;
  padding: 22px;
  position: absolute;
  right: 0;
  z-index: 1;
}

.project-card-category {
  background: rgba(255, 255, 255, 0.92);
  color: #333333;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
  padding: 5px 9px;
}

.project-card h3 {
  color: #ffffff;
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 7px;
}

.project-card p {
  color: rgba(255, 255, 255, 0.86);
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-card-featured {
  grid-column: span 6;
  min-height: 420px;
}

.project-card-standard {
  grid-column: span 4;
  min-height: 340px;
}

.project-card-tall {
  grid-column: span 3;
  min-height: 390px;
}

.project-card-wide {
  grid-column: span 6;
  min-height: 320px;
}

.project-card-small {
  grid-column: span 3;
  min-height: 300px;
}

.portfolio-empty {
  border: 1px dashed #d8d8d8;
  color: #666666;
  display: none;
  margin-top: 24px;
  padding: 26px;
  text-align: center;
}

.portfolio-load-more-wrap {
  margin-top: 34px;
  text-align: center;
}

.portfolio-load-more {
  background: #414141;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: none;
  font-weight: 800;
  min-height: 46px;
  padding: 12px 24px;
  transition: 0.2s ease;
}

.portfolio-load-more:hover {
  background: #b83030;
}

.portfolio-count {
  color: #666666;
  font-size: 14px;
  margin-top: 12px;
}

.project-modal {
  background: rgba(20, 20, 20, 0.86);
  bottom: 0;
  display: none;
  left: 0;
  overflow-y: auto;
  padding: 32px 18px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 99999;
}

.project-modal.is-open {
  display: block;
}

.project-modal-panel {
  background: #ffffff;
  margin: 0 auto;
  max-width: 1180px;
  position: relative;
}

.project-modal-close {
  align-items: center;
  background: #414141;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 44px;
  justify-content: center;
  position: absolute;
  right: 0;
  top: 0;
  width: 44px;
  z-index: 2;
}

.project-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.project-modal-media {
  background: #eeeeee;
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.project-modal-media img {
  display: block;
  height: auto;
  max-height: 78vh;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.18s ease, filter 0.18s ease;
  width: auto;
}

.project-modal-media.is-loading img {
  filter: blur(1px);
  opacity: 0.38;
}

.project-modal-media.is-loading::before {
  background: rgba(20, 20, 20, 0.48);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

.project-modal-media.is-loading::after {
  background: #ffffff;
  color: #252525;
  content: "Loading image...";
  font-size: 14px;
  font-weight: 800;
  left: 50%;
  min-width: 142px;
  padding: 11px 16px;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.project-modal-nav {
  align-items: center;
  background: rgba(20, 20, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 48px;
  font-weight: 400;
  height: 58px;
  justify-content: center;
  line-height: 1;
  min-width: 58px;
  padding: 0 0 5px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  z-index: 3;
}

.project-modal-nav:hover,
.project-modal-nav:focus {
  background: rgba(184, 48, 48, 0.92);
  border-color: rgba(255, 255, 255, 0.88);
  outline: 0;
}

.project-modal-nav:disabled {
  cursor: wait;
  opacity: 0.48;
}

.project-modal-nav-prev {
  left: 18px;
}

.project-modal-nav-next {
  right: 18px;
}

.project-modal-info {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 54px 34px 34px;
}

.project-modal-info span {
  color: #b83030;
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.project-modal-info h3 {
  color: #252525;
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 14px;
}

.project-modal-info p {
  color: #555555;
}

.project-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.project-modal-tags em {
  background: #f2f2f2;
  color: #555555;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  padding: 5px 8px;
}

.project-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}

.project-modal-actions button,
.project-modal-actions a {
  align-items: center;
  background: #414141;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
}

.project-modal-actions button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.project-modal-actions a,
.project-modal-actions .project-modal-primary-action {
  background: #b83030;
}

.project-inquiry-modal {
  align-items: center;
  background: rgba(10, 10, 10, 0.64);
  bottom: 0;
  display: none;
  justify-content: center;
  left: 0;
  overflow-y: auto;
  padding: 24px 16px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100000;
}

.project-inquiry-modal.is-open {
  display: flex;
}

.project-inquiry-panel {
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  max-width: 760px;
  position: relative;
  width: 100%;
}

.project-inquiry-close {
  align-items: center;
  background: #252525;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 0;
  top: 0;
  width: 42px;
}

.project-inquiry-heading {
  border-bottom: 1px solid #eeeeee;
  padding: 30px 34px 22px;
}

.project-inquiry-heading span {
  color: #b83030;
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.project-inquiry-heading h3 {
  color: #252525;
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.project-inquiry-heading p {
  color: #666666;
  margin: 0;
}

.project-inquiry-form {
  padding: 24px 34px 32px;
}

.project-inquiry-reference {
  background: #f7f7f7;
  border-left: 4px solid #b83030;
  color: #444444;
  margin-bottom: 18px;
  padding: 13px 15px;
}

.project-inquiry-reference strong,
.project-inquiry-reference span,
.project-inquiry-reference small {
  display: block;
}

.project-inquiry-reference strong {
  color: #252525;
  font-size: 16px;
  line-height: 1.3;
}

.project-inquiry-reference span {
  color: #b83030;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
  text-transform: uppercase;
}

.project-inquiry-reference small {
  color: #666666;
  font-size: 13px;
  margin-top: 6px;
}

.project-inquiry-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-inquiry-form label {
  color: #333333;
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 14px;
}

.project-inquiry-form label span {
  display: block;
  margin-bottom: 7px;
}

.project-inquiry-form input,
.project-inquiry-form textarea {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  color: #252525;
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  padding: 11px 12px;
  width: 100%;
}

.project-inquiry-form textarea {
  min-height: 156px;
  resize: vertical;
}

.project-inquiry-full {
  grid-column: 1 / -1;
}

.project-inquiry-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.project-inquiry-actions button {
  align-items: center;
  background: #414141;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
}

.project-inquiry-actions button[type="submit"] {
  background: #b83030;
}

.project-inquiry-actions button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.project-inquiry-form .contact-form-status {
  font-size: 14px;
  font-weight: 700;
  margin-top: 14px;
  min-height: 20px;
}

.project-inquiry-form .contact-form-status.is-success {
  color: #1d7f43;
}

.project-inquiry-form .contact-form-status.is-error {
  color: #b83030;
}

@media only screen and (max-width: 991px) {
  .portfolio-stats {
    grid-template-columns: 1fr;
  }

  .portfolio-controls {
    align-items: stretch;
    display: block;
  }

  .portfolio-filters {
    margin-bottom: 14px;
  }

  .portfolio-search {
    max-width: none;
  }

  .project-card-featured,
  .project-card-standard,
  .project-card-wide,
  .project-card-tall,
  .project-card-small {
    grid-column: span 6;
  }

  .project-modal-body {
    display: block;
  }

  .project-modal-media {
    min-height: 0;
  }

  .project-modal-info {
    min-height: 0;
    padding: 28px 22px;
  }

  .project-inquiry-modal {
    align-items: flex-start;
  }

  .project-inquiry-heading,
  .project-inquiry-form {
    padding-left: 22px;
    padding-right: 22px;
  }

  .project-inquiry-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media only screen and (max-width: 575px) {
  .portfolio-showcase {
    padding-top: 20px;
  }

  .portfolio-featured-grid,
  .project-gallery-grid {
    display: block;
  }

  .project-card {
    margin-bottom: 16px;
    min-height: 320px;
  }

  .project-card-content {
    padding: 18px;
  }

  .project-card h3 {
    font-size: 19px;
  }

  .project-modal {
    padding: 12px;
  }

  .project-modal-actions,
  .project-inquiry-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-modal-nav {
    font-size: 42px;
    height: 52px;
    min-width: 52px;
  }

  .project-modal-nav-prev {
    left: 10px;
  }

  .project-modal-nav-next {
    right: 10px;
  }

  .project-inquiry-modal {
    padding: 12px;
  }

  .project-inquiry-heading h3 {
    font-size: 23px;
  }
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  .portfolio-showcase {
    display: block;
  }
}
