/* Ajustes de proporción para el contador y la identidad visual del cliente. */
.iw-projects-count {
  width: 180px;
  min-width: 180px;
  flex: 0 0 180px;
  justify-content: center;
  box-sizing: border-box;
}

.iw-projects-count span {
  min-width: 0;
  max-width: 88px;
  overflow-wrap: normal;
  word-break: normal;
}

.iw-project-card__brand {
  display: flex;
  width: 190px;
  height: 76px;
  max-width: none;
  min-height: 76px;
  flex: 0 0 190px;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid #d5e6ee;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f5fafc);
  box-shadow: 0 7px 18px rgba(10, 60, 84, .06);
}

.iw-project-card__brand img {
  display: block;
  width: 100%;
  height: 60px;
  max-width: 174px;
  max-height: 60px;
  object-fit: contain;
}

/* Card vertical: conserva completa la portada horizontal y separa el pie de acciones. */
.iw-project-card {
  display: flex;
  flex-direction: column;
}

.iw-project-card__media {
  min-height: 0;
  aspect-ratio: 1170 / 540;
  border-bottom: 1px solid #d4e6ee;
}

.iw-project-card__media > a {
  height: 100%;
}

.iw-project-card__media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

.iw-project-card__media-action {
  display: none;
}

.iw-project-card__content {
  flex: 1;
  padding: 30px 34px 28px;
}

.iw-project-card__footer {
  min-height: 78px;
  align-items: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #d4e6ee;
}

.iw-projects-selection-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 2px 0 28px;
}

.iw-project-archive__intro h2 {
  margin: 8px 0 10px;
  color: #142f43;
  font-weight: 800;
}

.iw-project-archive__intro > div > p:last-child {
  margin: 0;
  color: #668095;
  line-height: 1.65;
}

.iw-projects-selection-label {
  flex: 0 0 auto;
  margin: 0;
  color: #0088cc;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.iw-projects-selection-heading > span {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #c9e6f2 0%, rgba(201, 230, 242, 0) 100%);
}

.iw-project-archive {
  margin-top: 72px;
  padding: 34px;
  border: 1px solid #c9e3ee;
  border-radius: 18px;
  background: linear-gradient(135deg, #e3f3f9 0%, #f4fafc 52%, #dceff7 100%);
  box-shadow: 0 16px 38px rgba(10, 96, 132, .06);
}

.iw-project-archive__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.iw-project-archive__toggle {
  flex: 0 0 auto;
}

.iw-project-archive__content {
  margin-top: 32px;
}

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

.iw-project-archive-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #d4e6ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(10, 60, 84, .07);
}

.iw-project-archive-card.is-pending {
  display: none;
}

.iw-project-archive-card.is-revealed {
  animation: iwProjectReveal .45s ease both;
}

.iw-project-archive-card__media {
  aspect-ratio: 1170 / 540;
  border-bottom: 1px solid #d4e6ee;
  background: #eef6f9;
}

.iw-project-archive-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.iw-project-archive-card__body {
  flex: 1;
  padding: 20px 18px;
}

.iw-project-archive-card__logo {
  width: auto;
  height: 34px;
  max-width: 120px;
  margin-bottom: 14px;
  object-fit: contain;
  object-position: left center;
}

.iw-project-archive-card h3 {
  margin: 0 0 8px;
  color: #142f43;
  font-size: 18px;
  font-weight: 800;
}

.iw-project-archive-card p {
  margin: 0;
  color: #668095;
  font-size: 14px;
  line-height: 1.55;
}

.iw-project-archive-card__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 18px;
  padding: 14px 0 16px;
  border-top: 1px solid #d4e6ee;
  color: #6d8494;
  font-size: 12px;
  font-weight: 700;
}

@media (min-width: 992px) {
  .iw-project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
  }

  .iw-project-card {
    height: 100%;
  }

  .iw-projects-intro--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
  }

  .iw-projects-intro--split > div:first-child {
    min-width: 0;
  }

  .iw-projects-intro__aside {
    min-width: 0;
  }

  .iw-projects-intro__aside .iw-projects-outline-button {
    max-width: 180px;
    padding-right: 13px;
    padding-left: 13px;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .iw-projects-count {
    width: 180px;
    min-width: 180px;
    min-height: 56px;
    flex: 0 0 auto;
    align-self: flex-start;
  }

  .iw-project-card__content {
    padding: 24px 20px 22px;
  }

  .iw-project-card__footer {
    align-items: stretch;
  }

  .iw-project-card__brand {
    width: 100%;
    height: 76px;
    flex-basis: 76px;
  }

  .iw-project-archive {
    margin-top: 52px;
    padding: 24px 18px;
  }

  .iw-project-archive__intro {
    align-items: stretch;
    flex-direction: column;
  }

  .iw-project-archive__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .iw-project-card__footer {
    flex-direction: column;
  }

  .iw-project-card__visit {
    width: 100%;
  }

  .iw-project-archive__grid {
    grid-template-columns: 1fr;
  }
}
