/* TEJIDOTECA · Portada v1.3.1
 * Every rule is gated by the transformed homepage marker.
 * Specific !important overrides are intentional: older homepage plugins emit
 * repeated, late inline styles for the same legacy hero and statistic classes.
 */

html body.home .thseo-home.tjhp-home {
  --tjhp-pink: #e6007e;
  --tjhp-black: #0b090c;
  --tjhp-ink: #19191d;
  --tjhp-light: #ddd5dc;
  --tjhp-rule: #ded4da;
  --tjhp-title: Oswald, "Arial Narrow", Arial, sans-serif;
  --tjhp-body: Abel, Arial, sans-serif;
  box-sizing: border-box;
  min-width: 0;
  font-family: var(--tjhp-body);
}

/* Divi's existing #left-area already has width:100% and padding:0.
 * Open only the container containing our marked homepage, so its child no
 * longer needs 100vw (which otherwise includes a desktop scrollbar).
 * Unsupported browsers retain the original full-bleed fallback unchanged.
 */
@supports selector(:has(*)) {
  html body.home #main-content > .container:has(#contenido-principal.tjhp-home) {
    width: 100% !important;
    max-width: none !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  html body.home .thseo-home.tjhp-home {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }
}

html body.home .thseo-home.tjhp-home .thseo-shell {
  width: calc(100% - 64px) !important;
  max-width: 1280px !important;
  min-width: 0 !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

html body.home .thseo-home.tjhp-home #biblioteca-de-tejidos,
html body.home .thseo-home.tjhp-home #taller-textil-inicio {
  scroll-margin-top: 96px;
}

/* One compact introduction, followed by three equally usable destinations. */
html body.home .thseo-home.tjhp-home .thseo-hero {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 44px 0 40px !important;
  color: #fff;
  background-color: var(--tjhp-black) !important;
  background-image: none !important;
  border-bottom: 1px solid #321a29 !important;
}

html body.home .thseo-home.tjhp-home .thseo-hero::before,
html body.home .thseo-home.tjhp-home .thseo-hero::after {
  display: none !important;
  content: none !important;
}

html body.home .thseo-home.tjhp-home .thseo-hero__grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) !important;
  gap: 28px 36px !important;
  align-items: center !important;
}

html body.home .thseo-home.tjhp-home .thseo-hero__copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

html body.home .thseo-home.tjhp-home #thseo-title.thseo-title--brand {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font-family: var(--tjhp-title) !important;
  font-size: clamp(40px, 5vw, 68px) !important;
  font-style: normal !important;
  font-weight: 500 !important;
  line-height: 1.06 !important;
  letter-spacing: -.018em !important;
  text-transform: uppercase;
}

html body.home .thseo-home.tjhp-home #thseo-title .thseo-title__line {
  display: block;
  white-space: nowrap;
}

html body.home .thseo-home.tjhp-home #thseo-title .thseo-title__accent {
  color: var(--tjhp-pink) !important;
  font-weight: 500 !important;
}

html body.home .thseo-home.tjhp-home .thseo-hero__lead {
  max-width: 600px !important;
  margin: 22px 0 0 !important;
  padding: 0 !important;
  color: var(--tjhp-light) !important;
  font: 400 20px/1.42 var(--tjhp-body) !important;
  text-wrap: pretty;
}

html body.home .thseo-home.tjhp-home .tjhp-attributes {
  margin: 18px 0 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font: 500 13px/1.4 var(--tjhp-title) !important;
  letter-spacing: .65px;
  word-spacing: 1px;
}

html body.home .thseo-home.tjhp-home .thseo-hero__visual {
  grid-column: 2;
  grid-row: 1;
  justify-self: stretch !important;
  align-self: center !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.home .thseo-home.tjhp-home .thseo-hero__visual img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 3 / 2 !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

html body.home .thseo-home.tjhp-home .tjhp-routes {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

html body.home .thseo-home.tjhp-home a.tjhp-route {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 20px 46px 20px 20px;
  color: #fff !important;
  background: #191419;
  border-top: 2px solid #49313e;
  text-decoration: none !important;
  transition: background-color .18s ease, border-color .18s ease;
}

html body.home .thseo-home.tjhp-home .tjhp-route__title {
  display: block;
  margin: 0 0 9px;
  color: #fff !important;
  font: 500 24px/1.2 var(--tjhp-title) !important;
  text-transform: uppercase;
}

html body.home .thseo-home.tjhp-home .tjhp-route__text {
  display: block;
  color: var(--tjhp-light) !important;
  font: 400 18px/1.36 var(--tjhp-body) !important;
  text-wrap: pretty;
}

html body.home .thseo-home.tjhp-home .tjhp-route__arrow {
  position: absolute;
  top: 20px;
  right: 18px;
  color: var(--tjhp-pink) !important;
  font: 400 24px/1 Arial, sans-serif;
}

html body.home .thseo-home.tjhp-home a.tjhp-route:hover {
  background: #321126;
  border-top-color: var(--tjhp-pink);
}

html body.home .thseo-home.tjhp-home a.tjhp-route:focus-visible,
html body.home .thseo-home.tjhp-home a.tjhp-practice:focus-visible,
html body.home .thseo-home.tjhp-home .tjhp-topics a:focus-visible,
html body.home .thseo-home.tjhp-home a.tjhp-taller__all:focus-visible,
html body.home .thseo-home.tjhp-home a.tjhp-index-link:focus-visible {
  outline: 3px solid var(--tjhp-pink) !important;
  outline-offset: 4px !important;
}

/* Workshop: reset the previous asymmetrical, minimum-height .tst-taller grid. */
html body.home .thseo-home.tjhp-home section.tst-taller.tjhp-taller {
  display: block !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  grid-template-areas: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 50px 0 !important;
  overflow: visible !important;
  color: var(--tjhp-ink) !important;
  background: #fff !important;
  border: 0 !important;
  font-family: var(--tjhp-body);
}

html body.home .thseo-home.tjhp-home .tjhp-taller > .thseo-shell {
  display: block;
  padding: 0 !important;
}

html body.home .thseo-home.tjhp-home .tjhp-taller__head {
  max-width: 850px;
  margin: 0 0 26px;
  padding: 0;
}

html body.home .thseo-home.tjhp-home .tjhp-taller__head .thseo-kicker {
  margin: 0 0 9px !important;
  color: var(--tjhp-pink) !important;
  font: 500 14px/1.3 var(--tjhp-title) !important;
  letter-spacing: 1.2px;
}

html body.home .thseo-home.tjhp-home .tjhp-taller__head h2#tst-taller-title {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--tjhp-ink) !important;
  font: 500 42px/1.12 var(--tjhp-title) !important;
  letter-spacing: -.3px;
  text-align: left;
  text-transform: uppercase;
}

html body.home .thseo-home.tjhp-home .tjhp-taller__head h2#tst-taller-title span {
  color: var(--tjhp-pink) !important;
}

html body.home .thseo-home.tjhp-home .tjhp-taller__head p {
  margin: 15px 0 0 !important;
  padding: 0 !important;
  color: #484148 !important;
  font: 400 19px/1.45 var(--tjhp-body) !important;
  text-wrap: pretty;
}

html body.home .thseo-home.tjhp-home .tjhp-practices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 24px;
  padding: 0;
}

html body.home .thseo-home.tjhp-home a.tjhp-practice {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  overflow: visible;
  color: var(--tjhp-ink) !important;
  background: #fff;
  border: 1px solid var(--tjhp-rule);
  text-decoration: none !important;
  transition: border-color .18s ease, background-color .18s ease;
}

html body.home .thseo-home.tjhp-home a.tjhp-practice > img {
  display: block !important;
  flex: none;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 2 !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #f4f1f3;
  transform: none !important;
}

html body.home .thseo-home.tjhp-home .tjhp-practice__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 19px 20px 20px;
}

html body.home .thseo-home.tjhp-home .tjhp-practice__body small {
  display: block;
  margin: 0 0 8px;
  color: #ab005c;
  font: 500 13px/1.28 var(--tjhp-title) !important;
  letter-spacing: .5px;
  text-transform: uppercase;
}

html body.home .thseo-home.tjhp-home .tjhp-practice__body h3 {
  margin: 0 0 17px !important;
  padding: 0 !important;
  color: var(--tjhp-ink) !important;
  font: 500 25px/1.18 var(--tjhp-title) !important;
  overflow-wrap: break-word;
  text-transform: uppercase;
}

html body.home .thseo-home.tjhp-home .tjhp-practice__body > span {
  display: block;
  margin-top: auto;
  color: #ab005c;
  font: 500 15px/1.25 var(--tjhp-title);
  text-transform: uppercase;
}

html body.home .thseo-home.tjhp-home a.tjhp-practice:hover {
  background: #fcf7fa;
  border-color: var(--tjhp-pink);
}

html body.home .thseo-home.tjhp-home .tjhp-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
}

html body.home .thseo-home.tjhp-home .tjhp-topics a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 13px;
  color: var(--tjhp-ink) !important;
  background: #f7f3f5;
  border: 1px solid var(--tjhp-rule);
  font: 500 14px/1.3 var(--tjhp-title) !important;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none !important;
  overflow-wrap: break-word;
  transition: border-color .18s ease, background-color .18s ease;
}

html body.home .thseo-home.tjhp-home .tjhp-topics a:hover {
  background: #fce4f1;
  border-color: var(--tjhp-pink);
}

html body.home .thseo-home.tjhp-home a.tjhp-taller__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  max-width: 100%;
  padding: 13px 22px;
  color: #fff !important;
  background: var(--tjhp-pink);
  font: 500 16px/1.3 var(--tjhp-title) !important;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: background-color .18s ease;
}

html body.home .thseo-home.tjhp-home a.tjhp-taller__all:hover {
  background: #a9005c;
}

/* One A–Z entry in the area heading, replacing the duplicated feature block. */
html body.home .thseo-home.tjhp-home .thseo-library .thseo-heading h2 {
  white-space: normal !important;
}

html body.home .thseo-home.tjhp-home a.tjhp-index-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  max-width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  color: #ab005c !important;
  font: 500 16px/1.3 var(--tjhp-title) !important;
  text-transform: uppercase;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

html body.home .thseo-home.tjhp-home a.tjhp-index-link:hover {
  color: var(--tjhp-ink) !important;
}

/* Keep native counter data and links; change presentation only. */
html body.home .thseo-home.tjhp-home .thseo-stats {
  padding: 30px 0 !important;
}

html body.home .thseo-home.tjhp-home .thseo-stats__grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html body.home .thseo-home.tjhp-home .thseo-stats__grid .thseo-stat {
  grid-column: auto !important;
  justify-self: stretch !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 134px !important;
  padding: 12px 8px !important;
}

html body.home .thseo-home.tjhp-home .thseo-stats__grid .thseo-stat__value {
  font-family: var(--tjhp-body) !important;
  font-size: 54px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: -1px !important;
}

html body.home .thseo-home.tjhp-home .thseo-stats__grid .thseo-stat__label {
  display: block !important;
  max-width: 100%;
  min-height: 36px !important;
  margin-top: 6px !important;
  font: 500 15px/1.2 var(--tjhp-title) !important;
  white-space: normal;
  overflow-wrap: break-word;
}

html body.home .thseo-home.tjhp-home .thseo-stats__grid .thseo-stat__note {
  margin-top: 4px !important;
  font: 500 11px/1.1 var(--tjhp-title) !important;
  letter-spacing: .15px !important;
  transform: none !important;
}

html body.home .thseo-home.tjhp-home .tjbc-blog-stat .thseo-stat__label,
html body.home .thseo-home.tjhp-home .tjbc-blog-stat .tjbc-label-full,
html body.home .thseo-home.tjhp-home .tjbc-blog-stat .tjbc-label-short {
  white-space: nowrap !important;
}

html body.home .thseo-home.tjhp-home .tjbc-blog-stat .tjbc-label-full {
  display: inline !important;
}

html body.home .thseo-home.tjhp-home .tjbc-blog-stat .tjbc-label-short {
  display: none !important;
}

@media (min-width: 700px) and (max-width: 999px) {
  html body.home .thseo-home.tjhp-home .thseo-hero__grid {
    column-gap: 24px !important;
  }

  html body.home .thseo-home.tjhp-home .thseo-hero__lead {
    font-size: 18px !important;
  }

  html body.home .thseo-home.tjhp-home a.tjhp-route {
    padding: 16px 34px 16px 15px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-route__title {
    font-size: 21px !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-route__arrow {
    top: 17px;
    right: 12px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practices {
    gap: 14px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practice__body {
    padding: 15px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practice__body h3 {
    font-size: 22px !important;
  }

  html body.home .thseo-home.tjhp-home .thseo-stats__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 699px) {
  html body.home .thseo-home.tjhp-home .thseo-shell {
    width: calc(100% - 40px) !important;
  }

  html body.home .thseo-home.tjhp-home #biblioteca-de-tejidos,
  html body.home .thseo-home.tjhp-home #taller-textil-inicio {
    scroll-margin-top: 180px;
  }

  html body.home .thseo-home.tjhp-home .thseo-hero {
    padding: 28px 0 !important;
  }

  html body.home .thseo-home.tjhp-home .thseo-hero__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 22px !important;
  }

  html body.home .thseo-home.tjhp-home .thseo-hero__copy {
    grid-column: 1;
    grid-row: 1;
  }

  html body.home .thseo-home.tjhp-home #thseo-title.thseo-title--brand {
    font-size: clamp(36px, 9.5vw, 52px) !important;
    line-height: 1.06 !important;
  }

  html body.home .thseo-home.tjhp-home .thseo-hero__lead {
    max-width: 560px !important;
    margin-top: 18px !important;
    font-size: 18px !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-attributes {
    margin-top: 14px !important;
    font-size: 12px !important;
    letter-spacing: .45px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-routes {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  html body.home .thseo-home.tjhp-home a.tjhp-route {
    padding: 14px 42px 14px 15px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-route__title {
    margin-bottom: 6px;
    font-size: 22px !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-route__arrow {
    top: 15px;
    right: 15px;
  }

  html body.home .thseo-home.tjhp-home .thseo-hero__visual {
    grid-column: 1;
    grid-row: 3;
  }

  html body.home .thseo-home.tjhp-home section.tst-taller.tjhp-taller {
    padding: 38px 0 !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-taller__head {
    margin-bottom: 22px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-taller__head h2#tst-taller-title {
    font-size: 34px !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-taller__head p {
    margin-top: 13px !important;
    font-size: 18px !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practices {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 22px;
  }

  html body.home .thseo-home.tjhp-home a.tjhp-practice {
    display: grid;
    grid-template-columns: minmax(0, .42fr) minmax(0, .58fr);
    align-items: stretch;
  }

  html body.home .thseo-home.tjhp-home a.tjhp-practice > img {
    align-self: center;
    height: auto !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practice__body {
    padding: 15px 13px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practice__body small {
    margin-bottom: 6px;
    font-size: 12px !important;
    letter-spacing: .25px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practice__body h3 {
    margin-bottom: 12px !important;
    font-size: 21px !important;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practice__body > span {
    font-size: 14px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-topics {
    gap: 8px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-topics a {
    padding: 10px 12px;
    font-size: 13px !important;
  }

  html body.home .thseo-home.tjhp-home a.tjhp-taller__all {
    width: 100%;
  }

  html body.home .thseo-home.tjhp-home .thseo-stats {
    padding: 26px 0 !important;
  }

  html body.home .thseo-home.tjhp-home .thseo-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html body.home .thseo-home.tjhp-home .tjbc-blog-stat .tjbc-label-full {
    display: none !important;
  }

  html body.home .thseo-home.tjhp-home .tjbc-blog-stat .tjbc-label-short {
    display: inline !important;
  }
}

@media (max-width: 359px) {
  html body.home .thseo-home.tjhp-home .tjhp-practice__body {
    padding: 13px 11px;
  }

  html body.home .thseo-home.tjhp-home .tjhp-practice__body h3 {
    font-size: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.home .thseo-home.tjhp-home a.tjhp-route,
  html body.home .thseo-home.tjhp-home a.tjhp-practice,
  html body.home .thseo-home.tjhp-home .tjhp-topics a,
  html body.home .thseo-home.tjhp-home a.tjhp-taller__all {
    transition: none;
  }
}

/* Author credit: keep TEJIDOTECA identity on hover; never fall back to theme black. */
html body.home .thseo-home.tjhp-home .thseo-author a,
html body.home .thseo-home.tjhp-home .thseo-author a:visited {
  color: #e6007e !important;
}

html body.home .thseo-home.tjhp-home .thseo-author a:hover,
html body.home .thseo-home.tjhp-home .thseo-author a:focus-visible {
  color: #f3a8ca !important;
}
