.agro-public-profile {
  --profile-ink: #102d18;
  --profile-muted: #637067;
  --profile-line: #dbe5dd;
  --profile-soft: #f3f7f3;
  --profile-accent: var(--secundario, #0a3111);
  background: #f7f9f7;
}

.agro-public-profile .main-content {
  padding-bottom: 64px;
  padding-top: 24px;
}

.agro-public-profile .row {
  display: block;
}

.profile-owner-notice,
.profile-hero,
.profile-card {
  border: 1px solid var(--profile-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(10, 49, 17, 0.06);
}

.profile-owner-notice {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
}

.profile-owner-notice div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-owner-notice strong {
  color: var(--profile-ink);
}

.profile-owner-notice span {
  color: var(--profile-muted);
  font-size: 14px;
}

.profile-owner-notice a,
.profile-primary-action,
.profile-contact-locked a {
  align-items: center;
  align-self: flex-start;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 10px 19px;
  background: var(--profile-accent);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.profile-owner-notice a:hover,
.profile-primary-action:hover,
.profile-contact-locked a:hover {
  color: #fff !important;
  opacity: 0.9;
  transform: translateY(-1px);
}

.profile-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.profile-story-action {
  align-items: center;
  border: 1px solid var(--profile-accent);
  border-radius: 999px;
  color: var(--profile-accent) !important;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  text-decoration: none !important;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.profile-story-action span {
  margin-left: 7px;
}

.profile-story-action:hover,
.profile-story-action:focus-visible {
  background: var(--profile-accent);
  color: #fff !important;
  transform: translateY(-1px);
}

.profile-story-action:focus-visible {
  outline: 3px solid rgba(52, 239, 90, .35);
  outline-offset: 2px;
}

.profile-hero {
  display: grid;
  overflow: hidden;
}

.profile-hero__identity {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 20px;
  text-align: center;
}

.profile-avatar {
  flex: 0 0 auto;
  position: relative;
}

.profile-avatar > img {
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--profile-line), 0 10px 25px rgba(10, 49, 17, 0.14);
  display: block;
  height: 132px;
  object-fit: cover;
  width: 132px;
}

.profile-verified {
  align-items: center;
  background: var(--profile-accent);
  border: 3px solid #fff;
  border-radius: 50%;
  bottom: 3px;
  color: #fff;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  position: absolute;
  right: 3px;
  width: 30px;
}

.profile-hero__copy h1 {
  color: var(--profile-ink);
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 8px 0 5px;
}

.profile-role,
.profile-section-heading > span,
.profile-section-heading > div > span {
  color: var(--profile-accent);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-activity {
  color: var(--profile-muted);
  font-size: 17px;
  margin: 0 0 10px;
}

.profile-location {
  align-items: center;
  color: var(--profile-ink);
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.profile-location img {
  flex: 0 0 auto;
  height: 20px;
  margin-right: 7px;
  width: 20px;
}

.profile-map {
  background: var(--profile-soft);
  min-height: 230px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.profile-map .leaflet-control-attribution {
  color: var(--profile-muted);
  font-size: 10px;
}

.profile-map__caption {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(10, 49, 17, 0.12);
  color: var(--profile-muted);
  font-size: 12px;
  padding: 5px 10px;
  pointer-events: none;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 500;
}

.profile-map__loading {
  align-items: center;
  background: rgba(247, 249, 247, 0.84);
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
  z-index: 500;
}

.profile-map__loading span {
  animation: profile-spin 650ms linear infinite;
  border: 3px solid rgba(10, 49, 17, 0.16);
  border-radius: 50%;
  border-top-color: var(--profile-accent);
  height: 36px;
  width: 36px;
}

.profile-map__empty {
  align-items: center;
  color: var(--profile-muted);
  display: none;
  inset: 0;
  justify-content: center;
  margin: 0;
  position: absolute;
}

.profile-map.is-empty .profile-map__loading {
  display: none;
}

.profile-map.is-empty .profile-map__empty {
  display: flex;
}

.profile-layout {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.profile-layout__main {
  align-content: start;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.agro-public-profile .profile-tabs {
  background: #fff;
  border: 1px solid var(--profile-line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
}

.agro-public-profile .profile-tabs[hidden],
.agro-public-profile [data-profile-panel][hidden] {
  display: none !important;
}

.agro-public-profile .profile-tab {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  color: var(--profile-muted);
  cursor: pointer;
  display: flex;
  flex: 1 1 180px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  line-height: 1.4;
  min-height: 46px;
  padding: 10px 16px;
}

.agro-public-profile .profile-tab:hover {
  background: var(--profile-soft);
  color: var(--profile-ink);
}

.agro-public-profile .profile-tab[aria-selected="true"] {
  background: var(--profile-accent);
  color: #fff;
}

.agro-public-profile .profile-tab:focus-visible {
  outline: 3px solid var(--profile-accent);
  outline-offset: 2px;
}

.profile-tab__count {
  background: var(--profile-soft);
  border-radius: 999px;
  color: var(--profile-accent);
  font-size: 12px;
  min-width: 24px;
  padding: 2px 6px;
}

.profile-card {
  padding: 24px 20px;
}

.profile-section-heading {
  margin-bottom: 23px;
}

.profile-section-heading h2 {
  color: var(--profile-ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 5px 0 0;
}

.profile-section-heading--row {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.profile-section-heading--row > strong {
  align-items: center;
  background: var(--profile-soft);
  border-radius: 50%;
  color: var(--profile-accent);
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.profile-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-facts > div {
  background: var(--profile-soft);
  border-radius: 12px;
  padding: 14px 15px;
}

.profile-facts dt {
  color: var(--profile-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.profile-facts dd {
  color: var(--profile-ink);
  font-size: 15px;
  font-weight: 650;
  margin: 0;
}

.profile-subsection {
  border-top: 1px solid var(--profile-line);
  margin-top: 24px;
  padding-top: 23px;
}

.profile-subsection h3 {
  color: var(--profile-ink);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.profile-tags li {
  background: #eaf2eb;
  border: 1px solid #d6e5d9;
  border-radius: 999px;
  color: var(--profile-ink);
  font-size: 14px;
  list-style: none;
  padding: 7px 12px;
}

.profile-product-grid {
  display: grid;
  gap: 10px;
}

.profile-product-group {
  border: 1px solid var(--profile-line);
  border-radius: 13px;
  padding: 15px;
}

.profile-product-group h4 {
  color: var(--profile-ink);
  font-size: 15px;
  font-weight: 750;
  margin: 0 0 9px;
}

.profile-product-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.profile-product-group li,
.profile-product-group p {
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
  margin: 0;
}

.profile-product-group li:not(:last-child)::after {
  content: " ·";
}

.profile-publication-list {
  display: grid;
  gap: 10px;
}

.profile-publication {
  align-items: flex-start;
  border: 1px solid var(--profile-line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 17px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.profile-publication:hover {
  border-color: #b8cebc;
  transform: translateY(-1px);
}

.profile-publication time {
  color: var(--profile-muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.profile-publication h3 {
  color: var(--profile-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.profile-publication p {
  color: var(--profile-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 7px 0 0;
}

.profile-publication > a {
  color: var(--profile-accent) !important;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.profile-empty,
.profile-empty-state p {
  color: var(--profile-muted);
}

.profile-empty-state {
  align-items: center;
  background: var(--profile-soft);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 150px;
  padding: 24px;
  text-align: center;
}

.profile-empty-state span {
  color: var(--profile-accent);
  font-size: 34px;
  line-height: 1;
}

.profile-empty-state p {
  margin: 0;
}

.profile-contact {
  align-self: start;
}

.profile-contact-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.profile-contact-list li {
  align-items: flex-start;
  border-bottom: 1px solid var(--profile-line);
  display: flex;
  gap: 12px;
  list-style: none;
  min-width: 0;
  padding: 13px 0;
}

.profile-contact-list li:first-child {
  padding-top: 0;
}

.profile-contact-list img {
  flex: 0 0 auto;
  height: 22px;
  margin-top: 3px;
  object-fit: contain;
  width: 22px;
}

.profile-contact-list span {
  color: var(--profile-ink);
  min-width: 0;
}

.profile-contact-list small {
  color: var(--profile-muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-transform: uppercase;
}

.profile-contact-list a {
  color: var(--profile-ink) !important;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.profile-contact-list a:hover {
  color: var(--profile-accent) !important;
}

.profile-socials {
  display: flex;
  gap: 9px;
  padding-top: 18px;
}

.profile-socials a {
  align-items: center;
  background: var(--profile-soft);
  border-radius: 50%;
  display: flex;
  height: 42px;
  justify-content: center;
  transition: transform 160ms ease;
  width: 42px;
}

.profile-socials a:hover {
  transform: translateY(-2px);
}

.profile-socials img {
  height: 21px;
  object-fit: contain;
  width: 21px;
}

.profile-contact-locked {
  align-items: center;
  background: var(--profile-soft);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  text-align: center;
}

.profile-contact-locked > span {
  color: var(--profile-accent);
  font-size: 28px;
}

.profile-contact-locked p {
  color: var(--profile-muted);
  line-height: 1.5;
  margin: 8px 0 16px;
}

#publicaciones,
#profile-professional {
  scroll-margin-top: 110px;
}

@media (min-width: 600px) {
  .profile-owner-notice {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 18px;
  }

  .profile-hero__identity {
    flex-direction: row;
    padding: 32px;
    text-align: left;
  }

  .profile-location {
    justify-content: flex-start;
  }

  .profile-hero__actions {
    justify-content: flex-start;
  }

  .profile-facts,
  .profile-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-publication {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 900px) {
  .agro-public-profile .main-content {
    padding-bottom: 88px;
    padding-top: 36px;
  }

  .profile-hero {
    grid-template-columns: minmax(0, 58%) minmax(320px, 42%);
  }

  .profile-hero__identity {
    gap: 26px;
    min-height: 300px;
    padding: 42px;
  }

  .profile-avatar > img {
    height: 156px;
    width: 156px;
  }

  .profile-map {
    min-height: 300px;
  }

  .profile-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    margin-top: 22px;
  }

  .profile-card {
    padding: 30px;
  }

  .profile-contact {
    position: sticky;
    top: 110px;
  }
}

@media (min-width: 1200px) {
  .profile-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@keyframes profile-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-map__loading span {
    animation-duration: 1.5s;
  }

  .profile-owner-notice a,
  .profile-primary-action,
  .profile-story-action,
  .profile-contact-locked a,
  .profile-publication,
  .profile-socials a {
    transition: none;
  }
}
