/* SISPLUS v0.19.0.4 · Directorio público de aliados */

.ally-directory,
.public-ally-profile {
  display: grid;
  gap: 1.25rem;
}

.ally-directory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.4rem, 3vw, 2.35rem);
  border: 1px solid #d3e4ee;
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 8%, rgba(80, 166, 107, .17), transparent 27%),
    radial-gradient(circle at 70% 100%, rgba(11, 116, 201, .12), transparent 34%),
    linear-gradient(135deg, #ffffff, #f4fafe);
  box-shadow: 0 18px 44px rgba(17, 67, 101, .08);
}

.ally-directory-hero h1 {
  max-width: 830px;
  margin: .25rem 0 .55rem;
}

.ally-directory-hero-copy > p {
  max-width: 820px;
  margin: 0;
  color: #557186;
  font-size: 1rem;
}

.ally-directory-hero-actions {
  display: grid;
  gap: .65rem;
  min-width: 205px;
}

.ally-directory-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.15rem;
}

.ally-directory-summary article {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 150px;
  padding: .68rem .82rem;
  border: 1px solid rgba(200, 221, 234, .85);
  border-radius: 15px;
  background: rgba(255, 255, 255, .82);
}

.ally-directory-summary article > span {
  font-size: 1.2rem;
}

.ally-directory-summary strong,
.ally-directory-summary small {
  display: block;
}

.ally-directory-summary strong {
  color: #0b6fb9;
  font-size: 1.15rem;
}

.ally-directory-summary small {
  color: #637b8c;
  font-size: .66rem;
}

.ally-owned-section,
.ally-directory-content,
.public-ally-section {
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid #d6e5ee;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 67, 101, .055);
}

.ally-section-heading,
.public-ally-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.ally-section-heading h2,
.public-ally-section-heading h2 {
  margin: .18rem 0 .2rem;
}

.ally-section-heading p,
.public-ally-section-heading p {
  margin: 0;
  color: #667e90;
}

.ally-results-count {
  display: grid;
  min-width: 92px;
  place-items: center;
  padding: .65rem .8rem;
  border-radius: 14px;
  background: #eaf5fc;
  color: #0b669f;
}

.ally-results-count strong {
  font-size: 1.35rem;
  line-height: 1;
}

.ally-results-count span {
  margin-top: .18rem;
  font-size: .65rem;
  font-weight: 750;
}

.ally-owned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: .85rem;
}

.ally-owned-card {
  display: grid;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid #dce8ef;
  border-radius: 17px;
  background: #f9fcfe;
}

.ally-owned-card-head {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: center;
}

.ally-owned-card h3,
.ally-owned-card p {
  margin: 0;
}

.ally-owned-observation {
  padding: .65rem;
  border-radius: 11px;
  background: #fff6dd;
  color: #6d5814;
  font-size: .75rem;
}

.ally-directory-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(190px, .8fr) minmax(190px, .8fr) auto;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1.15rem;
  padding: .9rem;
  border-radius: 17px;
  background: #f4f9fc;
}

.ally-directory-tools label {
  display: grid;
  gap: .35rem;
  color: #274d68;
  font-size: .72rem;
  font-weight: 800;
}

.ally-search-field > div {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 45px;
  padding: 0 .75rem;
  border: 1px solid #bdd3e0;
  border-radius: 12px;
  background: #fff;
}

.ally-search-field input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.ally-directory-tools select {
  min-height: 45px;
}

.ally-clear-filters {
  min-height: 45px;
}

.ally-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 410px));
  justify-content: center;
  gap: 1rem;
}

.ally-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 410px;
  height: 100%;
  overflow: hidden;
  border: 1px solid #d4e3ec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 13px 32px rgba(17, 67, 101, .075);
  transition: transform .18s ease, box-shadow .18s ease;
}

.ally-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(17, 67, 101, .12);
}

.ally-card[hidden] {
  display: none !important;
}

.ally-card-media {
  position: relative;
  min-height: 160px;
  background:
    radial-gradient(circle at 78% 25%, rgba(255, 255, 255, .82), transparent 27%),
    linear-gradient(135deg, #dff3ff, #eef8ff);
}

.ally-card-media.type-veterinary,
.ally-card-media.type-professional {
  background: linear-gradient(135deg, #dff3ff, #eff9f3);
}

.ally-card-media.type-store,
.ally-card-media.type-company {
  background: linear-gradient(135deg, #fff3dd, #edf5ff);
}

.ally-card-media.type-foundation {
  background: linear-gradient(135deg, #e1f7e7, #f4fbf6);
}

.ally-card-cover,
.public-ally-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ally-card-logo {
  position: absolute;
  left: 1rem;
  bottom: -43px;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 25px rgba(17, 67, 101, .16);
}

.ally-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .35rem;
}

.ally-card-logo-fallback {
  font-size: 2.1rem;
}

.ally-verified-badge,
.public-ally-verified {
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 2;
  padding: .45rem .68rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #267440;
  box-shadow: 0 8px 20px rgba(17, 67, 101, .09);
  font-size: .67rem;
  font-weight: 900;
}

.ally-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .72rem;
  min-width: 0;
  padding: 3.35rem 1.1rem 1.1rem;
}

.ally-type-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: .38rem .65rem;
  border-radius: 999px;
  background: #e9f6ec;
  color: #327046;
  font-size: .67rem;
  font-weight: 850;
}

.ally-card-title-row h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ally-card-title-row {
  min-height: 55px;
}

.ally-card-location {
  margin: .25rem 0 0;
  color: #60798b;
  font-size: .75rem;
}

.ally-card-description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4f6c80;
  font-size: .82rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.ally-card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
}

.ally-card-highlights span {
  padding: .38rem .56rem;
  border: 1px solid #d7e5ed;
  border-radius: 999px;
  background: #f5f9fc;
  color: #315a74;
  font-size: .66rem;
  font-weight: 780;
}

.ally-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
  padding-top: .35rem;
}

.ally-card-actions .button.primary {
  width: 100%;
}

.ally-card-actions .button.secondary {
  flex: 1 1 110px;
}

.ally-empty-state {
  display: grid;
  place-items: center;
  gap: .45rem;
  min-height: 240px;
  padding: 2rem;
  border: 1px dashed #b9ceda;
  border-radius: 20px;
  background: #f9fcfe;
  text-align: center;
}

.ally-empty-state[hidden] {
  display: none !important;
}

.ally-empty-state > span {
  font-size: 2rem;
}

.ally-empty-state h2,
.ally-empty-state h3,
.ally-empty-state p {
  margin: 0;
}

/* Perfil público */

.public-ally-hero {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #d1e2ec;
  border-radius: 27px;
  background: linear-gradient(135deg, #dff3ff, #eef8f2);
  box-shadow: 0 18px 44px rgba(17, 67, 101, .09);
}

.public-ally-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(241, 249, 253, .97) 0%, rgba(241, 249, 253, .87) 50%, rgba(241, 249, 253, .42) 100%);
}

.public-ally-identity {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  min-height: 330px;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.public-ally-logo {
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, .95);
  border-radius: 31px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(17, 67, 101, .18);
}

.public-ally-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .5rem;
}

.public-ally-logo span {
  font-size: 3rem;
}

.public-ally-heading-copy h1 {
  margin: .6rem 0 .35rem;
}

.public-ally-heading-copy > p {
  max-width: 760px;
  margin: 0;
  color: #4d6d82;
  line-height: 1.6;
}

.public-ally-contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .85rem;
}

.public-ally-contact-chips span,
.public-ally-contact-chips a {
  padding: .48rem .68rem;
  border: 1px solid #ccdde7;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #244e69;
  font-size: .72rem;
  text-decoration: none;
}

.public-ally-verified {
  position: static;
  align-self: start;
  white-space: nowrap;
}

.public-ally-nav {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .65rem;
  border: 1px solid #d5e4ed;
  border-radius: 17px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 25px rgba(17, 67, 101, .07);
  backdrop-filter: blur(10px);
}

.public-ally-nav a {
  padding: .58rem .75rem;
  border-radius: 10px;
  color: #405f75;
  font-size: .72rem;
  font-weight: 850;
  text-decoration: none;
}

.public-ally-nav a:hover {
  background: #e9f4fb;
  color: #0b6fb9;
}

.public-ally-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.public-ally-summary article {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .9rem;
  border: 1px solid #d6e4ec;
  border-radius: 17px;
  background: #fff;
}

.public-ally-summary article > span {
  font-size: 1.25rem;
}

.public-ally-summary small,
.public-ally-summary strong {
  display: block;
}

.public-ally-summary small {
  color: #6a8190;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-ally-summary strong {
  color: #0b70b8;
  font-size: 1.3rem;
}

.public-ally-section {
  scroll-margin-top: 150px;
}

.public-ally-section-base {
  color: #678091;
  font-size: .7rem;
  font-weight: 750;
}

.public-ally-information-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.public-ally-panel,
.public-ally-mini-card,
.public-ally-offer-card {
  padding: 1rem;
  border: 1px solid #dbe7ee;
  border-radius: 18px;
  background: #fafdff;
}

.public-ally-panel-icon {
  font-size: 1.35rem;
}

.public-ally-panel h3 {
  margin: .45rem 0 .6rem;
}

.public-ally-rich-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #506d81;
  line-height: 1.65;
}

.public-ally-detail-list {
  display: grid;
  gap: .5rem;
  margin-top: .9rem;
}

.public-ally-detail-list > div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: .65rem;
  padding-top: .5rem;
  border-top: 1px solid #e5edf2;
}

.public-ally-detail-list dt {
  color: #6a8190;
  font-size: .68rem;
  font-weight: 800;
}

.public-ally-detail-list dd {
  margin: 0;
  color: #294f69;
}

.public-ally-service-list {
  display: grid;
  gap: .45rem;
}

.public-ally-service-list span {
  padding: .52rem .65rem;
  border-radius: 11px;
  background: #edf7f0;
  color: #356b45;
  font-size: .75rem;
}

.public-ally-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}

.public-ally-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: .85rem;
}

.public-ally-mini-card,
.public-ally-offer-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.public-ally-mini-card h3,
.public-ally-mini-card p,
.public-ally-offer-card h3,
.public-ally-offer-card p {
  margin: 0;
}

.public-ally-mini-card p,
.public-ally-offer-card p {
  color: #5c7587;
  line-height: 1.5;
}

.public-ally-mini-card a,
.public-ally-offer-card .button {
  margin-top: auto;
}

.public-ally-product-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 13px;
  object-fit: cover;
}

.public-ally-trust {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border: 1px solid #c8e5cf;
  border-radius: 17px;
  background: #eff9f2;
  color: #356a46;
}

.public-ally-trust > span {
  font-size: 1.4rem;
}

.public-ally-trust strong {
  display: block;
}

.public-ally-trust p {
  margin: .15rem 0 0;
  font-size: .75rem;
}

@media (max-width: 1000px) {
  .ally-directory-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ally-clear-filters {
    width: 100%;
  }

  .public-ally-identity {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .public-ally-logo {
    width: 106px;
    height: 106px;
  }

  .public-ally-verified {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .ally-directory-hero,
  .public-ally-information-grid {
    grid-template-columns: 1fr;
  }

  .ally-directory-hero-actions {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .ally-section-heading,
  .public-ally-section-heading {
    display: grid;
    align-items: start;
  }

  .ally-directory-tools {
    grid-template-columns: 1fr;
  }

  .ally-directory-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-ally-identity {
    grid-template-columns: 1fr;
    align-content: end;
    min-height: 390px;
  }

  .public-ally-logo {
    width: 92px;
    height: 92px;
  }

  .public-ally-cover-overlay {
    background: linear-gradient(0deg, rgba(241, 249, 253, .98) 0%, rgba(241, 249, 253, .78) 67%, rgba(241, 249, 253, .2) 100%);
  }

  .public-ally-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-ally-nav {
    top: 65px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .public-ally-nav a {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .ally-directory-hero-actions {
    grid-template-columns: 1fr;
  }

  .ally-directory-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ally-directory-summary article {
    min-width: 0;
  }

  .ally-card-actions .button {
    width: 100%;
    flex: 1 1 100%;
  }

  .public-ally-summary {
    grid-template-columns: 1fr 1fr;
  }

  .public-ally-contact-actions .button {
    width: 100%;
  }
}
