/* ============================================================
   REPOSITORIO DE ESTUDIOS
   Diseño editorial: índice numerado, sin cajas, jerarquía asimétrica
   Hereda el design system del sitio (--navy, --blue, --white...)
   ============================================================ */

/* ─────────────────────────────────────────────
   HERO DEL ÍNDICE
   ───────────────────────────────────────────── */
.repo-hero {
  background: var(--navy-deep);
  padding: 9.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.repo-hero::after {
  content: '';
  position: absolute;
  top: -30%; right: -8%;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(194,121,58,.13) 0%, transparent 68%);
  pointer-events: none;
}
.repo-hero__inner { position: relative; z-index: 1; }

.repo-hero__label {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: 'Space Mono', monospace;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 1.75rem;
}
.repo-hero__label::after {
  content: '';
  flex: 1;
  max-width: 90px;
  height: 1px;
  background: rgba(194,121,58,.45);
}

.repo-hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 17ch;
  margin-bottom: 1.5rem;
}
.repo-hero__intro {
  color: rgba(255,255,255,.6);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 52ch;
}

.repo-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.repo-stat strong {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: .3rem;
}
.repo-stat span {
  font-family: 'Space Mono', monospace;
  font-size: .74rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.45);
}

/* ─────────────────────────────────────────────
   FILTROS — texto con subrayado, no botones pesados
   ───────────────────────────────────────────── */
.repo-index {
  background: var(--white);
  padding: 0 0 5.5rem;
}
.filters-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  margin-bottom: 1rem;
}
.filters {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1.5rem 0 0;
}
.filters::-webkit-scrollbar { display: none; }

.filter-pill {
  position: relative;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0 0 1.1rem;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gray-500);
  cursor: pointer;
  white-space: nowrap;
  transition: color .22s ease;
}
.filter-pill::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.filter-pill:hover { color: var(--text-dark); }
.filter-pill.active { color: var(--text-dark); }
.filter-pill.active::after { transform: scaleX(1); }
.filter-pill__count {
  font-family: 'Space Mono', monospace;
  font-size: .64rem;
  vertical-align: super;
  margin-left: .25rem;
  color: var(--gray-500);
  font-weight: 400;
}

/* ─────────────────────────────────────────────
   ÍNDICE EDITORIAL — filas, no cajas
   ───────────────────────────────────────────── */
.study-list { display: flex; flex-direction: column; }

.study-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 2.5rem;
  align-items: start;
  padding: 2.6rem 1.25rem 2.6rem 0;
  border-bottom: 1px solid var(--gray-300);
  text-decoration: none;
  position: relative;
  transition: background .3s ease, padding .3s ease;
}
.study-row::before {
  content: '';
  position: absolute;
  inset: 0 -1.25rem;
  background: var(--gray-50);
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 0;
}
.study-row:hover::before { opacity: 1; }
.study-row > * { position: relative; z-index: 1; }
.study-row:hover { padding-left: 1.25rem; }

.study-row__num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.9rem;
  font-weight: 800;
  line-height: .85;
  letter-spacing: -.04em;
  color: var(--gray-300);
  transition: color .3s ease;
}
.study-row:hover .study-row__num { color: var(--blue); }

.study-row__body { min-width: 0; }
.study-row__cat {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .7rem;
}
.study-row__title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.12rem, 1.85vw, 1.42rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--text-dark);
  margin-bottom: .7rem;
  max-width: 34ch;
}
.study-row__hook {
  font-size: .95rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--gray-500);
  max-width: 56ch;
  margin-bottom: .9rem;
}
.study-row__meta {
  font-family: 'Space Mono', monospace;
  font-size: .7rem;
  letter-spacing: .03em;
  color: var(--gray-500);
  opacity: .8;
}

.study-row__arrow {
  align-self: center;
  width: 42px; height: 42px;
  border: 1.5px solid var(--gray-300);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.study-row:hover .study-row__arrow {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  transform: translateX(5px);
}

.study-empty {
  padding: 4rem 0;
  text-align: center;
  color: var(--gray-500);
  font-style: italic;
}

/* ─────────────────────────────────────────────
   ARTÍCULO
   ───────────────────────────────────────────── */
.study-article {
  background: var(--navy-deep);
  padding: 9rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.study-article::after {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(194,121,58,.1) 0%, transparent 70%);
  pointer-events: none;
}
.study-article > .container { position: relative; z-index: 1; }

.study-back {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: 'Space Mono', monospace;
  font-size: .78rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color .22s ease, gap .22s ease;
}
.study-back:hover { color: var(--blue-bright); gap: .85rem; }

.study-head { margin-bottom: 3rem; }
.study-head__cat {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 1.1rem;
}
.study-article h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -.02em;
  max-width: 22ch;
  margin-bottom: 1.6rem;
}
.study-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-family: 'Space Mono', monospace;
  font-size: .74rem;
  letter-spacing: .03em;
  color: rgba(255,255,255,.4);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.study-body { max-width: 62ch; }
.study-body p {
  color: rgba(255,255,255,.8);
  font-size: 1.09rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.study-body p.study-first-p::first-letter {
  float: left;
  font-family: 'Poppins', sans-serif;
  font-size: 3.6rem;
  font-weight: 800;
  line-height: .88;
  color: var(--blue);
  margin: .12em .16em 0 0;
}

/* Subtítulos H2 dentro de artículos largos */
.study-h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
  margin: 2.5rem 0 1.1rem;
  letter-spacing: -.01em;
}
.study-body > .study-h2:first-child { margin-top: 0; }


.study-pullquote {
  margin: 3.5rem 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid var(--blue);
  font-family: 'Poppins', sans-serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -.01em;
  color: var(--white);
  max-width: 30ch;
}

.study-citation {
  margin-top: 3rem;
  padding: 1.6rem 1.75rem;
  background: rgba(255,255,255,.03);
  border-left: 2px solid rgba(255,255,255,.18);
  max-width: 68ch;
}
.study-citation__label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: .7rem;
}
.study-citation p {
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
  line-height: 1.7;
  color: rgba(255,255,255,.55);
  margin: 0;
}

.study-cta {
  background: var(--gray-50);
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--gray-300);
}
.study-cta h2 {
  color: var(--text-dark);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25;
  max-width: 20ch;
  margin: 0 auto 1rem;
}
.study-cta p {
  color: var(--text-body);
  max-width: 50ch;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .study-row {
    grid-template-columns: 58px 1fr;
    gap: 1.5rem;
    padding: 2.1rem 0;
  }
  .study-row__num { font-size: 2.1rem; }
  .study-row__arrow { display: none; }
  .study-row:hover { padding-left: .75rem; }
}

@media (max-width: 600px) {
  .repo-hero { padding: 7.5rem 0 3.5rem; }
  .repo-hero__meta { gap: 1.75rem; margin-top: 2.25rem; }
  .repo-stat strong { font-size: 1.3rem; }
  .filters { gap: 1.5rem; padding-top: 1.25rem; }
  .filter-pill { font-size: .76rem; padding-bottom: .95rem; }
  .study-article { padding: 7.5rem 0 4rem; }
  .study-back { margin-bottom: 2rem; }
  .study-row { grid-template-columns: 44px 1fr; gap: 1.1rem; }
  .study-row__num { font-size: 1.6rem; }
  .study-row__hook { font-size: .9rem; }
  .study-body p { font-size: 1.02rem; }
  .study-pullquote { margin: 2.5rem 0; padding-left: 1.25rem; }
  .study-citation { padding: 1.25rem 1.35rem; }
}

/* ─────────────────────────────────────────────
   PÁGINAS DE SERVICIO Y CASOS
   ───────────────────────────────────────────── */
.svc-crumbs {
  font-family: 'Space Mono', monospace;
  font-size: .74rem;
  letter-spacing: .03em;
  color: rgba(255,255,255,.4);
  margin-bottom: 2.5rem;
}
.svc-crumbs a { color: rgba(255,255,255,.55); text-decoration: none; }
.svc-crumbs a:hover { color: var(--blue-bright); }
.svc-crumbs span { color: rgba(255,255,255,.75); }

.svc-lead {
  color: rgba(255,255,255,.82);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: 1.8rem;
}
.svc-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.svc-list { margin: 0 0 1.6rem; padding-left: 1.2rem; }
.svc-list li {
  color: rgba(255,255,255,.8);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: .6rem;
}
.svc-list li::marker { color: var(--blue); }
.svc-list strong, .study-body strong { color: var(--white); }
.study-body a { color: var(--blue-bright); }
.study-body a:hover { text-decoration: none; }

.svc-case-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 0 3rem;
}
.svc-cite {
  display: block;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: .95rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
}

.svc-section h2 { margin-bottom: 2rem; }
.svc-faq { border-top: 1px solid var(--gray-300); }
.svc-faq .faq-item.open .faq-a { max-height: 420px; }

.svc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.svc-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--gray-300);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-dark);
  transition: border-color .2s ease, transform .2s ease;
}
.svc-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.svc-card strong { font-family: 'Poppins', sans-serif; font-size: 1.1rem; line-height: 1.35; }
.svc-card__tag {
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
}
.svc-card__cta { font-size: .88rem; font-weight: 600; color: var(--blue); margin-top: auto; }

.svc-subhead { margin-bottom: 1rem; }
.svc-articles { list-style: none; padding: 0; margin: 0; }
.svc-articles li { border-bottom: 1px solid var(--gray-300); }
.svc-articles a {
  display: block;
  padding: .95rem 0;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
}
.svc-articles a:hover { color: var(--blue); }

.svc-cta-note { margin: 1.1rem auto 0 !important; font-size: .88rem; color: var(--gray-500) !important; }
.svc-cta-note a { color: var(--blue); }

.svc-index-hero { padding-bottom: 3.5rem; }
.svc-tile { text-decoration: none; color: inherit; }
.svc-tile__title { font-size: clamp(1.1rem, 1.8vw, 1.3rem); margin: .4rem 0 .6rem; }
.svc-tile .svc-card__cta { display: inline-block; margin-top: .8rem; }

.svc-related-box {
  background: var(--gray-50);
  padding: 2.5rem 0 0;
}
.svc-related-box .container {
  border: 1px solid var(--gray-300);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.svc-related-box a { color: var(--text-dark); text-decoration: none; font-size: 1.15rem; }
.svc-related-box a strong { font-family: 'Poppins', sans-serif; }
.svc-related-box a:hover { color: var(--blue); }
.svc-related-box p { color: var(--text-body); margin: 0; line-height: 1.6; }

@media (max-width: 700px) {
  .svc-cards { grid-template-columns: 1fr; }
  .svc-related-box .container { margin-inline: 16px; width: auto; }
}
