/* Huella Animal Experience Core — structural layer 1.2.3 */

body.huella-experience-core .post-content {
  width: 100%;
  max-width: none;
}

body.huella-experience-core .post-content > .fusion-fullwidth.haec-section {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
}

body.huella-experience-core .post-content > .fusion-fullwidth.haec-section > .fusion-builder-row.haec-canvas {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

body.huella-experience-core.home .post-content > .ha-home-volunteer.haec-feature-card {
  width: min(calc(100% - 48px), 1180px) !important;
  max-width: 1180px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

body.huella-experience-core.home .ha-home-lines > .fusion-builder-row.haec-canvas {
  width: 100% !important;
  max-width: 1180px !important;
}

/* Related rescues are rendered from WordPress data, not Avada card widths. */
body.huella-experience-core .haec-related-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 34px;
}
body.huella-experience-core .haec-related-grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

body.huella-experience-core .haec-related-section {
  box-sizing: border-box;
  width: 100%;
  padding: var(--ha-section, 72px) 24px !important;
  background: #fff !important;
}

body.huella-experience-core .haec-related-inner {
  width: min(100%, 1180px);
  margin-inline: auto;
  text-align: center;
}

body.huella-experience-core .haec-related-inner > .ha-eyebrow { text-align: center; }
body.huella-experience-core .haec-related-inner > h2 { margin-bottom: 34px; }
body.huella-experience-core .haec-related-back { margin-top: 2px; }

body.huella-experience-core .haec-related-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--ha-line, #dbe4e8);
  border-radius: var(--ha-radius-md, 20px);
  background: #fff;
  color: var(--ha-navy-900, #0b405e);
  text-decoration: none;
  box-shadow: var(--ha-shadow-sm, 0 8px 24px rgba(8, 47, 69, 0.08));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

body.huella-experience-core .haec-related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ha-shadow-md, 0 18px 48px rgba(8, 47, 69, 0.12));
}

body.huella-experience-core .haec-related-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ha-sky-100, #edf7fa);
}

body.huella-experience-core .haec-related-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
  object-fit: cover;
  transition: transform 300ms ease;
}

body.huella-experience-core .haec-related-card:hover img { transform: scale(1.035); }

body.huella-experience-core .haec-related-card__body {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 18px;
}

body.huella-experience-core .haec-related-card__body strong {
  overflow-wrap: anywhere;
  color: var(--ha-navy-900, #0b405e);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 1.08rem;
  line-height: 1.2;
}

body.huella-experience-core .haec-related-card__action {
  flex: 0 0 auto;
  color: var(--ha-teal-700, #087b91);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 750;
}

body.huella-experience-core .haec-related-card__action::after { content: ' →'; }

/* News index: stable 3/2/1 grid regardless of Avada's tablet widths. */
body.huella-experience-core.ha-page-noticias .haec-news-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

body.huella-experience-core.ha-page-noticias .haec-news-grid > .haec-news-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100%;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--ha-line, #dbe4e8);
  border-radius: var(--ha-radius-md, 20px);
  background: #fff;
  box-shadow: var(--ha-shadow-sm, 0 8px 24px rgba(8, 47, 69, 0.08));
}

body.huella-experience-core.ha-page-noticias .haec-news-card > .fusion-column-wrapper {
  display: flex !important;
  height: 100%;
  min-height: 0 !important;
  flex-direction: column;
  padding-bottom: 22px !important;
}

body.huella-experience-core.ha-page-noticias .haec-news-card .fusion-imageframe,
body.huella-experience-core.ha-page-noticias .haec-news-card .fusion-imageframe a { display: block; width: 100%; }
body.huella-experience-core.ha-page-noticias .haec-news-card img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3;
  border-radius: 0 !important;
  object-fit: cover;
}

body.huella-experience-core .haec-news-card__meta {
  display: block;
  margin: 18px 20px 8px;
  color: var(--ha-teal-700, #087b91);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.huella-experience-core.ha-page-noticias .haec-news-card .fusion-title { margin: 0 20px 10px !important; }
body.huella-experience-core.ha-page-noticias .haec-news-card .fusion-title h2,
body.huella-experience-core.ha-page-noticias .haec-news-card .fusion-title h3,
body.huella-experience-core.ha-page-noticias .haec-news-card .fusion-title h4 { font-size: 1.16rem !important; line-height: 1.28 !important; }
body.huella-experience-core .haec-news-card__excerpt {
  display: -webkit-box;
  margin: 0 20px 18px !important;
  overflow: hidden;
  color: var(--ha-muted, #5d6973) !important;
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.huella-experience-core .haec-news-card__action {
  margin: auto 20px 0;
  color: var(--ha-teal-700, #087b91);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}
body.huella-experience-core .haec-news-card__action::after { content: ' →'; }

body.huella-experience-core .ha-mobile-adoption-cta.is-footer-hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

/* Editorial and legal templates share the same reading rhythm. */
body.huella-experience-core.single-noticias #main,
body.huella-experience-core.haec-legal #main,
body.huella-experience-core.haec-role #main {
  padding: clamp(52px, 6vw, 84px) 24px !important;
  background: #fff !important;
}

body.huella-experience-core.single-noticias article,
body.huella-experience-core.single-noticias .haec-editorial-content,
body.huella-experience-core.haec-legal article,
body.huella-experience-core.haec-legal .haec-legal-content,
body.huella-experience-core.haec-role article,
body.huella-experience-core.haec-role .haec-role-content {
  width: min(100%, 780px) !important;
  max-width: 780px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

body.huella-experience-core .haec-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  margin: 0 0 24px;
  color: var(--ha-muted, #5d6973);
  font-size: 0.88rem;
  font-weight: 650;
}

body.huella-experience-core .haec-article-meta > * + *::before {
  margin-right: 22px;
  color: var(--ha-teal-700, #087b91);
  content: '•';
}

body.huella-experience-core .haec-article-image {
  width: min(100vw - 48px, 980px);
  margin: 0 50% clamp(34px, 5vw, 56px);
  transform: translateX(-50%);
}

body.huella-experience-core .haec-article-image img {
  display: block;
  width: 100%;
  max-height: 580px;
  border-radius: var(--ha-radius-lg, 28px);
  object-fit: cover;
  box-shadow: var(--ha-shadow-sm, 0 8px 24px rgba(8, 47, 69, 0.08));
}

body.huella-experience-core .haec-editorial-content > p,
body.huella-experience-core .haec-legal-content > p,
body.huella-experience-core .haec-legal-content > li {
  font-size: 1.05rem;
  line-height: 1.78;
}

body.huella-experience-core .haec-editorial-content > p:first-of-type {
  color: var(--ha-navy-900, #0b405e);
  font-size: clamp(1.16rem, 2vw, 1.34rem);
  font-weight: 520;
  line-height: 1.58;
}

body.huella-experience-core .haec-editorial-content h2,
body.huella-experience-core .haec-legal-content h2 { margin-top: clamp(42px, 6vw, 66px); }

body.huella-experience-core .haec-editorial-content h3,
body.huella-experience-core .haec-legal-content h3 { margin-top: 34px; }

body.huella-experience-core .haec-role-content > p:first-child {
  margin-bottom: 34px;
  color: var(--ha-navy-900, #0b405e);
  font-size: clamp(1.1rem, 2vw, 1.26rem);
  line-height: 1.65;
}

body.huella-experience-core .haec-role-label {
  margin: 38px 0 12px !important;
  color: var(--ha-navy-900, #0b405e) !important;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 1.22rem;
  font-weight: 780;
}

body.huella-experience-core .haec-role-content > ul,
body.huella-experience-core .haec-role-content > ol {
  display: grid;
  gap: 10px;
  margin: 0 0 30px;
  padding: 24px 26px 24px 48px;
  border: 1px solid var(--ha-line, #dbe4e8);
  border-radius: var(--ha-radius-md, 20px);
  background: var(--ha-sky-100, #edf7fa);
}

body.huella-experience-core .haec-role-content .wp-block-buttons { margin: 38px 0 18px; }
body.huella-experience-core .haec-role-content .wp-block-button__link {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 14px;
  background: var(--ha-yellow-500, #f4bc32);
  color: var(--ha-ink, #192733);
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 750;
  text-decoration: none;
}
body.huella-experience-core .haec-role-back { margin-top: 22px; }

body.huella-experience-core .haec-about-cta {
  box-sizing: border-box;
  width: 100%;
  margin-top: var(--ha-section, 72px);
  padding: var(--ha-section, 72px) 24px;
  background: linear-gradient(135deg, var(--ha-navy-950, #082f45), var(--ha-teal-700, #087b91));
}

body.huella-experience-core .haec-about-cta__inner {
  width: min(100%, 960px);
  margin-inline: auto;
  text-align: center;
}
body.huella-experience-core .haec-about-cta .ha-eyebrow { color: #9fe7ef; text-align: center; }
body.huella-experience-core .haec-about-cta h2,
body.huella-experience-core .haec-about-cta p { color: #fff !important; }
body.huella-experience-core .haec-about-cta p { max-width: 680px; margin: 0 auto 28px; }
body.huella-experience-core .haec-about-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
body.huella-experience-core .haec-about-cta .ha-button--outline { border-color: #fff !important; color: #fff !important; }

@media (max-width: 1024px) {
  body.huella-experience-core .haec-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.huella-experience-core.ha-page-noticias .haec-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  body.huella-experience-core.home .post-content > .ha-home-volunteer.haec-feature-card {
    width: calc(100% - 36px) !important;
  }

  body.huella-experience-core .haec-related-grid { gap: 12px; }
  body.huella-experience-core .haec-related-grid[data-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.huella-experience-core .haec-related-grid[data-count="3"] > .haec-related-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 6px);
    justify-self: center;
  }
  body.huella-experience-core .haec-related-section { padding: var(--ha-section, 46px) 18px !important; }
  body.huella-experience-core .haec-related-card__body {
    min-height: 76px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 13px 12px 15px;
  }
  body.huella-experience-core .haec-related-card__body strong { font-size: 0.94rem; }
  body.huella-experience-core .haec-related-card__action { font-size: 0.76rem; }

  body.huella-experience-core.single-noticias #main,
  body.huella-experience-core.haec-legal #main,
  body.huella-experience-core.haec-role #main { padding: 42px 18px 58px !important; }
  body.huella-experience-core .haec-article-image {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    transform: none;
  }
  body.huella-experience-core .haec-article-meta { gap: 6px 14px; }
  body.huella-experience-core .haec-article-meta > * + *::before { margin-right: 14px; }
  body.huella-experience-core.ha-page-noticias .haec-news-grid { grid-template-columns: 1fr; gap: 18px; }
  body.huella-experience-core .haec-about-cta { padding: var(--ha-section, 46px) 18px; }
  body.huella-experience-core .haec-about-cta__actions { display: grid; }
}

@media (max-width: 370px) {
  body.huella-experience-core .haec-related-grid { grid-template-columns: 1fr; }
  body.huella-experience-core .haec-related-grid[data-count="3"] { grid-template-columns: 1fr; }
  body.huella-experience-core .haec-related-grid[data-count="3"] > .haec-related-card:last-child { grid-column: auto; width: 100%; }
}

@media (min-width: 768px) {
  body.huella-experience-core.ha-page-voluntariado .ha-role-card,
  body.huella-experience-core.ha-page-voluntariado .ha-role-card > .fusion-column-wrapper { min-height: 278px !important; }
}
