/*
 * Sistema `ta-*` del single de `case` (H5) — fusión deduplicada de los dos
 * <style> inline de la fuente (case-of-smart-city.html y
 * case-talent-arena.html, casi idénticos). Encolado SOLO en el single
 * (is_singular('case'), ver inc/enqueue.php); el archive usa .case-row/
 * .cases-list/.case-actions/.company-tag, que ya viven en styles.css.
 *
 * Las reglas .case-actions/.company-tag que este archivo tenía hasta H4
 * (16 líneas, .case-actions/.company-tag) eran una copia byte-a-byte de
 * styles.css:3487-3505 y nunca se encolaban (cases.html, la única página
 * que las usa, no las carga en la fuente) — redundantes, se eliminan.
 *
 * Bugs de la fuente NO portados (ver docs/design-source.md y single-case.php):
 * - CSS muerto del stylesheet de talent-arena (`.ta-add-photos`,
 *   `.ta-quote-text`/`.ta-quote-author` en su variante "borde turquesa
 *   izquierdo, sin usar", `.ta-context-note`): ninguna de las dos fuentes
 *   tiene markup que las use.
 * - `.ta-hero-img svg`/`span`, `.ta-gslot svg`: estilaban el icono
 *   placeholder de "imagen" que se ve ENCIMA de las fotos reales en la
 *   fuente — el single ya no imprime ese markup, así que sus reglas
 *   quedarían muertas.
 *
 * Cambio deliberado sobre la fuente:
 * - `.ta-highlights`: `repeat(5, 1fr)` en smart-city / `repeat(4, 1fr)` en
 *   talent-arena → `repeat(auto-fit, minmax(150px, 1fr))`, porque el número
 *   de highlights ahora es un dato editable (campo meta), no fijo por
 *   página.
 * - `.ta-quote`/`.ta-quote-text`/`.ta-quote-author`: los dos singles reales
 *   de la fuente estilan la cita 100% inline (tarjeta blanca con sombra),
 *   pisando la regla `.ta-quote` que el stylesheet de talent-arena sí
 *   define (variante "borde turquesa", nunca vista en pantalla). Aquí se
 *   define de verdad, con el resultado visual real (blanca, sombra,
 *   padding 3rem) — no la variante muerta.
 *
 * @package Barter
 */

.ta-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}

/* Hero */
.ta-hero {
  background: var(--navy);
  padding: 2.5rem;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.ta-hero-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--turquoise);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ta-hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--turquoise);
}

.ta-hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}

.ta-hero-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.ta-meta-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.ta-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

.ta-meta-value {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.ta-hero-img {
  border-radius: 16px;
  height: 220px;
  background: var(--navy-2);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.ta-hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 40, 0.4) 0%, transparent 100%);
}

/* Tags */
.ta-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* H13 (revisión del cliente): el primer tag (`.active`, ver single-case.php)
   llevaba el mismo fondo turquesa que los botones/links reales del sitio
   (.btn-turquoise, .filter-btn.active) — Leticia señaló que eso hacía
   parecer clickeable a una etiqueta que no lo es. Se unifica el estilo de
   todos los tags (son etiquetas de servicio, no navegación) — el `active`
   sigue en el markup por si se necesita distinguirlo de otra forma más
   adelante, pero ya no imita un botón. */
.ta-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--navy);
  letter-spacing: 0.02em;
  transition: 0.3s ease;
}

/* Highlights */
.ta-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 2rem;
}

.ta-hl {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ta-hl:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 40, 0.05);
}

.ta-hl-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.ta-hl-num span {
  color: var(--turquoise);
}

.ta-hl-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 500;
}

/* Narrative */
.ta-narrative {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}

.ta-narr-card {
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--white);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ta-narr-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 40, 0.1);
}

.ta-narr-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 10px;
}

.ta-narr-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}

.ta-narr-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.ta-narr-card.highlight {
  background: var(--navy);
  border-color: var(--navy);
}

.ta-narr-card.highlight .ta-narr-title {
  color: var(--white);
}

.ta-narr-card.highlight .ta-narr-body {
  color: rgba(255, 255, 255, 0.7);
}

/* Scope (talent-arena) */
.ta-scope {
  margin-bottom: 2.5rem;
}

.ta-scope-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
}

.ta-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ta-scope-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: transform 0.3s ease;
}

.ta-scope-item:hover {
  transform: translateX(5px);
}

.ta-scope-item .ta-bubble {
  flex: none;
  margin-top: 2px;
}

.ta-scope-item span {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}

/* Footprint (smart-city) */
.ta-footprint {
  margin-bottom: 2.5rem;
}

.ta-footprint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ta-footprint-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.ta-footprint-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.ta-footprint-flagship {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 16px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 40, 0.1);
}

.ta-footprint-flagship:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 40, 0.15);
}

.ta-footprint-flagship .bubble {
  flex: none;
}

.ta-footprint-flagship-text {
  color: var(--white);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.ta-footprint-flagship-text b {
  color: var(--turquoise);
  font-weight: 800;
}

.ta-footprint-flagship-arrow {
  color: var(--turquoise);
  font-size: 18px;
  font-weight: 800;
}

.ta-footprint-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ta-footprint-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.ta-footprint-item:hover {
  transform: translateY(-2px);
  border-color: var(--turquoise);
  background: var(--white);
  box-shadow: 0 5px 15px rgba(0, 0, 40, 0.05);
}

.ta-footprint-item .bubble {
  flex: none;
}

.ta-footprint-item span {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  flex: 1;
}

.ta-footprint-item .arrow {
  color: var(--turquoise);
  font-size: 16px;
  font-weight: 800;
}

/* Gallery */
.ta-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ta-gallery-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.ta-gallery-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.ta-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 200px 140px;
  gap: 12px;
  margin-bottom: 16px;
  cursor: pointer;
}

.ta-gslot {
  border-radius: 16px;
  background: var(--soft);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ta-gslot:hover:not(.more) {
  transform: scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 0, 40, 0.15);
  z-index: 10;
}

.ta-gslot.main {
  grid-row: 1 / 3;
}

.ta-gslot-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 30, 0.6);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(4px);
}

.ta-gslot.more {
  background: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.ta-gslot.more:hover {
  background: var(--navy-2);
}

.ta-gslot.more span {
  font-size: 14px;
  font-weight: 800;
  color: var(--white);
}

/* Modal / lightbox de la galería completa */
.archive-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 30, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.archive-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.archive-modal-content {
  background: var(--white);
  border-radius: 24px;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 50, 0.25);
}

.archive-modal-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.archive-modal-content > p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.archive-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--soft);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.archive-modal-close:hover {
  background: var(--turquoise);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 1.5rem;
}

.archive-item {
  border-radius: 12px;
  overflow: hidden;
  height: 200px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.archive-item:hover {
  transform: scale(1.02);
}

/* Quote — variante real (tarjeta blanca), no la de .ta-quote muerta que
   traía el stylesheet de talent-arena (borde turquesa izquierdo, nunca
   usada: los dos singles reales estilaban la cita 100% inline con este
   mismo resultado). */
.ta-quote {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 32px;
  text-align: left;
  align-items: flex-start;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.ta-quote-icon {
  flex-shrink: 0;
  width: 48px;
  margin: 0;
  margin-top: 8px;
}

.ta-quote-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 16px;
}

.ta-quote-author {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}

@media (max-width: 768px) {
  .ta-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .ta-highlights,
  .ta-narrative,
  .ta-scope-grid,
  .ta-footprint-grid,
  .ta-gallery,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .ta-gallery {
    grid-template-rows: auto;
  }

  .ta-gslot {
    height: 160px;
  }

  .ta-gslot.main {
    grid-row: auto;
    height: 220px;
  }

  .ta-quote {
    padding: 1.5rem;
  }
}
