/*
 * Soul Therapy Dogs — Certificates / Certificados
 * Astra Free + Gutenberg
 * Namespace: std-certificates-page / stdc-
 * Sin JavaScript y sin unidades de altura viewport.
 */

.std-certificates-page {
  --stdc-night: #061827;
  --stdc-navy: #102a46;
  --stdc-blue: #173b5f;
  --stdc-red: #c93b3d;
  --stdc-red-text: #ad3032;
  --stdc-rose: #eda7a8;
  --stdc-paper: #f5f2ec;
  --stdc-mist: #e6edef;
  --stdc-ink: #14202a;
  --stdc-muted: #53636d;
  --stdc-line: #c8d1d6;
  --stdc-slate: #5d6970;             /* sustituye #65737b / #6c7a82 / #6a777e, todos bajo AA */
  --stdc-on-red: #fff5f5;            /* texto tenue sobre --stdc-red: 4,70:1 */
  --stdc-white: #ffffff;
  --stdc-max: 1180px;
}

/* Astra: ancho completo solo en las páginas que contienen este paquete. */
body:has(.std-certificates-page) .site-content .ast-container,
body:has(.std-certificates-page) .site-content > .ast-container,
body:has(.std-certificates-page) .content-area,
body:has(.std-certificates-page) .site-main,
body:has(.std-certificates-page) article.page,
body:has(.std-certificates-page) article.page .entry-content {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}

body:has(.std-certificates-page) article.page .entry-header,
body:has(.std-certificates-page) .entry-content > .wp-block-post-title {
  display: none;
}

body:has(.std-certificates-page) article.page .entry-content > .wp-block-html {
  margin: 0;
}

.std-certificates-page,
.std-certificates-page * {
  box-sizing: border-box;
}

.std-certificates-page {
  width: 100%;
  margin: 0;
  color: var(--stdc-ink);
  background: var(--stdc-paper);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.std-certificates-block {
  margin: 0;
}

.std-certificates-page :is(h1, h2, h3, p, ol, dl) {
  margin-top: 0;
}

.std-certificates-page :is(h1, h2, h3) {
  font-family: inherit;
  font-weight: 800;
}

.std-certificates-page a {
  color: inherit;
  text-decoration: none;
}

.std-certificates-page a:focus-visible {
  outline: 3px solid var(--stdc-rose);
  outline-offset: 4px;
}

.stdc-container {
  width: min(calc(100% - 48px), var(--stdc-max));
  margin-inline: auto;
}

.stdc-section {
  padding-block: clamp(80px, 9vw, 128px);
  scroll-margin-block-start: 96px;
}

.stdc-eyebrow {
  margin-bottom: 18px;
  color: var(--stdc-red-text);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
}

.stdc-eyebrow--light {
  color: #f3b8b9;
}

.stdc-section-number {
  margin-bottom: 0;
  color: var(--stdc-slate);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.stdc-heading,
.stdc-profile__header {
  display: grid;
  grid-template-columns: 0.32fr 1.28fr 0.72fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: end;
}

.stdc-heading h2,
.stdc-profile__header h2 {
  max-width: 800px;
  margin-bottom: 0;
  color: var(--stdc-ink);
  font-size: clamp(2.6rem, 5vw, 4.75rem);
  letter-spacing: -0.052em;
  line-height: 0.99;
}

.stdc-heading h2 em {
  color: var(--stdc-red-text);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.stdc-heading > p:last-child,
.stdc-profile__header > p:last-child {
  margin-bottom: 0;
  color: var(--stdc-muted);
  font-size: 0.88rem;
  line-height: 1.78;
}

.stdc-heading--compact {
  grid-template-columns: 0.32fr 1.68fr;
}

/* 01 — Hero */
.stdc-hero {
  position: relative;
  min-height: 760px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--stdc-white);
  background: var(--stdc-night);
}

.stdc-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.65;
  background:
    linear-gradient(90deg, rgba(6, 24, 39, 1) 0%, rgba(6, 24, 39, 0.94) 54%, rgba(6, 24, 39, 0.38) 100%),
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(255, 255, 255, 0.07) 84px 85px),
    repeating-linear-gradient(0deg, transparent 0 84px, rgba(255, 255, 255, 0.07) 84px 85px),
    linear-gradient(135deg, var(--stdc-navy), var(--stdc-red));
}

.stdc-hero__pattern::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 590px;
  right: 7%;
  top: 76px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 32px 32px 0 rgba(237, 167, 168, 0.15), -26px -26px 0 rgba(255, 255, 255, 0.06);
  transform: rotate(6deg);
}

.stdc-hero__layout {
  position: relative;
  z-index: 1;
  padding-block: 150px 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(50px, 8vw, 124px);
  align-items: end;
}

.stdc-hero h1 {
  max-width: 900px;
  margin-bottom: 28px;
  color: var(--stdc-white);
  font-size: clamp(3.25rem, 6.4vw, 6.55rem);
  letter-spacing: -0.064em;
  line-height: 0.91;
}

.stdc-hero h1 em {
  color: var(--stdc-rose);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.stdc-hero__lead {
  max-width: 680px;
  margin-bottom: 34px;
  color: #d6e0e4;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.75;
}

.stdc-hero__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stdc-hero__nav a {
  min-height: 48px;
  display: inline-flex;
  gap: 26px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  color: var(--stdc-white);
  font-size: 0.72rem;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease;
}

.stdc-hero__nav a:hover {
  border-color: var(--stdc-white);
  background: rgba(255, 255, 255, 0.1);
}

.stdc-hero__index {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(16, 42, 70, 0.78);
  backdrop-filter: blur(8px);
}

.stdc-hero__index > p {
  margin-bottom: 18px;
  color: var(--stdc-rose);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stdc-hero__index ol {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
}

.stdc-hero__index li {
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.stdc-hero__index li span {
  color: var(--stdc-rose);
  font-size: 0.64rem;
  font-weight: 900;
}

.stdc-hero__index li strong {
  color: var(--stdc-white);
  font-size: 0.76rem;
}

/* 02 — Intro */
.stdc-intro {
  background: var(--stdc-paper);
}

.stdc-principles {
  margin-top: clamp(60px, 8vw, 108px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--stdc-line);
  border-bottom: 1px solid var(--stdc-line);
}

.stdc-principles article {
  min-height: 274px;
  padding: 32px 30px 34px 0;
}

.stdc-principles article + article {
  padding-left: 30px;
  border-left: 1px solid var(--stdc-line);
}

.stdc-principles span,
.stdc-policy__grid strong {
  display: block;
  margin-bottom: 60px;
  color: var(--stdc-red-text);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.stdc-principles h3,
.stdc-policy__grid h3 {
  margin-bottom: 13px;
  font-size: 1.16rem;
  line-height: 1.28;
}

.stdc-principles p,
.stdc-policy__grid p {
  margin-bottom: 0;
  color: var(--stdc-muted);
  font-size: 0.85rem;
  line-height: 1.74;
}

/* 03–04 — Profiles and certificate cards */
.stdc-profile--paper {
  background: var(--stdc-mist);
}

.stdc-profile--dark {
  color: var(--stdc-white);
  background: var(--stdc-navy);
}

.stdc-profile--dark .stdc-section-number,
.stdc-policy .stdc-section-number {
  color: #c3d0d6;
}

.stdc-profile--dark .stdc-profile__header h2,
.stdc-policy .stdc-heading h2 {
  color: var(--stdc-white);
}

.stdc-profile--dark .stdc-profile__header > p:last-child,
.stdc-policy .stdc-heading > p:last-child {
  color: #c7d2d7;
}

.stdc-cards {
  margin-top: clamp(58px, 8vw, 104px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.stdc-card {
  min-width: 0;
  grid-column: span 6;
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  min-height: 390px;
  border: 1px solid rgba(20, 32, 42, 0.16);
  background: var(--stdc-white);
  box-shadow: 0 18px 45px rgba(6, 24, 39, 0.08);
}

.stdc-card--featured,
.stdc-card--wide {
  grid-column: span 12;
  grid-template-columns: minmax(220px, 0.65fr) 1.35fr;
  min-height: 360px;
}

.stdc-card__preview {
  min-height: 100%;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--stdc-white);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 52%),
    var(--stdc-blue);
}

.stdc-card:nth-child(3n + 2) .stdc-card__preview {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 52%),
    var(--stdc-red);
}

.stdc-card:nth-child(3n) .stdc-card__preview {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 52%),
    #58676f;
}

.stdc-card__preview span {
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
}

.stdc-card__preview small {
  margin-top: 12px;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.stdc-card__body {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stdc-card__type {
  margin-bottom: 18px;
  color: var(--stdc-red-text);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.stdc-card h3 {
  margin-bottom: 17px;
  color: var(--stdc-ink);
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.stdc-card__body > p:not(.stdc-card__type) {
  margin-bottom: 24px;
  color: var(--stdc-muted);
  font-size: 0.84rem;
  line-height: 1.72;
}

.stdc-card dl {
  width: 100%;
  margin: auto 0 22px;
  padding-top: 15px;
  border-top: 1px solid var(--stdc-line);
}

.stdc-card dl div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-block: 6px;
}

.stdc-card dt {
  color: var(--stdc-slate);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stdc-card dd {
  margin: 0;
  color: var(--stdc-ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.stdc-card__status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #d5b76d;
  border-radius: 999px;
  color: #6e5416;
  background: #fff8e6;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* Se activa al sustituir el estado por un enlace al PDF público. */
.stdc-card__link {
  display: inline-flex;
  min-height: 38px;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border: 1px solid var(--stdc-navy);
  border-radius: 999px;
  color: var(--stdc-white) !important;
  background: var(--stdc-navy);
  font-size: 0.68rem;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease;
}

.stdc-card__link:hover {
  color: var(--stdc-white) !important;
  background: var(--stdc-red);
  transform: translateY(-2px);
}

/* Alternativa para una miniatura JPG/WebP del certificado redactado. */
.stdc-card__image {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: var(--stdc-mist);
}

.stdc-profile--dark .stdc-card {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

/* 05 — Complementary records */
.stdc-support {
  background: var(--stdc-paper);
}

.stdc-records {
  margin-top: clamp(58px, 8vw, 104px);
  border-top: 1px solid var(--stdc-line);
}

.stdc-records article {
  min-height: 104px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 130px;
  gap: 24px;
  align-items: center;
  padding-block: 20px;
  border-bottom: 1px solid var(--stdc-line);
}

.stdc-records time {
  color: var(--stdc-red-text);
  font-size: 0.76rem;
  font-weight: 900;
}

.stdc-records h3 {
  margin-bottom: 5px;
  font-size: 1rem;
  line-height: 1.3;
}

.stdc-records p {
  margin-bottom: 0;
  color: var(--stdc-muted);
  font-size: 0.79rem;
}

.stdc-records article > span {
  justify-self: end;
  color: var(--stdc-slate);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* 06 — Documentation policy */
.stdc-policy {
  color: var(--stdc-white);
  background: var(--stdc-red);
}

.stdc-policy__grid {
  margin-top: clamp(58px, 8vw, 104px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.46);
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
}

.stdc-policy__grid article {
  min-height: 314px;
  padding: 30px 24px 34px 0;
}

.stdc-policy__grid article + article {
  padding-left: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.46);
}

.stdc-policy__grid strong,
.stdc-policy__grid h3,
.stdc-policy__grid p {
  color: #fff5f5;
}

/* 07 — CTA */
.stdc-cta {
  padding-block: clamp(84px, 10vw, 140px);
  color: var(--stdc-white);
  background: var(--stdc-night);
}

.stdc-cta__layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(48px, 9vw, 130px);
  align-items: end;
}

.stdc-cta h2 {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--stdc-white);
  font-size: clamp(3rem, 5.7vw, 5.7rem);
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.stdc-cta__layout > div:last-child > p {
  margin-bottom: 30px;
  color: #c6d3d8;
  font-size: 0.9rem;
  line-height: 1.8;
}

.stdc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stdc-button {
  min-height: 54px;
  display: inline-flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.stdc-button:hover {
  transform: translateY(-2px);
}

.stdc-button--primary {
  color: var(--stdc-white);
  background: var(--stdc-red);
}

.stdc-button--primary:hover {
  background: #ad3032;
}

.stdc-button--secondary {
  border-color: rgba(255, 255, 255, 0.44);
  color: var(--stdc-white);
  background: transparent;
}

.stdc-button--secondary:hover {
  border-color: var(--stdc-white);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
  .stdc-heading,
  .stdc-heading--compact,
  .stdc-profile__header {
    grid-template-columns: 0.28fr 1.72fr;
  }

  .stdc-heading > p:last-child,
  .stdc-profile__header > p:last-child {
    grid-column: 2;
  }

  .stdc-hero__layout {
    grid-template-columns: 1fr 270px;
    gap: 38px;
  }

  .stdc-card,
  .stdc-card--featured,
  .stdc-card--wide {
    grid-column: span 12;
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .stdc-policy__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stdc-policy__grid article:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.46);
    border-left: 0;
  }

  .stdc-policy__grid article:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.46);
  }
}

@media (max-width: 720px) {
  .stdc-container {
    width: min(calc(100% - 36px), var(--stdc-max));
  }

  .stdc-section {
    padding-block: 74px;
  }

  .stdc-heading,
  .stdc-heading--compact,
  .stdc-profile__header {
    display: block;
  }

  .stdc-section-number {
    margin-bottom: 40px;
  }

  .stdc-heading h2,
  .stdc-profile__header h2 {
    font-size: clamp(2.35rem, 11vw, 3.55rem);
  }

  .stdc-heading > p:last-child,
  .stdc-profile__header > p:last-child {
    margin-top: 24px;
  }

  .stdc-hero {
    min-height: 780px;
  }

  .stdc-hero__pattern::after {
    width: 230px;
    height: 310px;
    right: -48px;
    top: 58px;
  }

  .stdc-hero__layout {
    padding-block: 250px 34px;
    display: block;
  }

  .stdc-hero h1 {
    font-size: clamp(2.85rem, 13vw, 4.15rem);
    line-height: 0.94;
  }

  .stdc-hero__lead {
    font-size: 0.91rem;
  }

  .stdc-hero__nav {
    flex-direction: column;
  }

  .stdc-hero__nav a {
    width: 100%;
  }

  .stdc-hero__index {
    display: none;
  }

  .stdc-principles,
  .stdc-policy__grid {
    grid-template-columns: 1fr;
  }

  .stdc-principles article,
  .stdc-principles article + article,
  .stdc-policy__grid article,
  .stdc-policy__grid article + article,
  .stdc-policy__grid article:nth-child(3),
  .stdc-policy__grid article:nth-child(4) {
    min-height: 0;
    padding: 28px 0;
    border-left: 0;
  }

  .stdc-principles article + article {
    border-top: 1px solid var(--stdc-line);
  }

  .stdc-policy__grid article + article,
  .stdc-policy__grid article:nth-child(3),
  .stdc-policy__grid article:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.46);
  }

  .stdc-principles span,
  .stdc-policy__grid strong {
    margin-bottom: 34px;
  }

  .stdc-card,
  .stdc-card--featured,
  .stdc-card--wide {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .stdc-card__preview {
    min-height: 154px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .stdc-card__image {
    height: 220px;
    min-height: 220px;
  }

  .stdc-card__preview span {
    font-size: 3.25rem;
  }

  .stdc-card__body {
    padding: 28px 24px;
  }

  .stdc-records article {
    grid-template-columns: 68px 1fr;
    gap: 16px;
  }

  .stdc-records article > span {
    grid-column: 2;
    justify-self: start;
  }

  .stdc-cta__layout {
    grid-template-columns: 1fr;
  }

  .stdc-cta h2 {
    font-size: clamp(2.85rem, 13vw, 4.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .std-certificates-page *,
  .std-certificates-page *::before,
  .std-certificates-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
