/* ==========================================================================
   lang-es.css — Spanish (es) layout compensation
   --------------------------------------------------------------------------
   Loaded by _includes/layouts/base.njk only when currentLang == 'es'.
   Scoped to [data-lang="es"] so EN and PT rendering is byte-for-byte unchanged.

   Rationale: the Spanish navigation string set runs ~35% longer than English
   (104 chars vs 77 across the seven top-level items), and .nav-menu is capped
   at max-width: 950px with .nav-link set to white-space: nowrap. Without this
   file the nav row overflows into the language selector between roughly
   993px and 1400px viewport width.
   See LAYOUT-RISK-ES.md, items 1-3.
   ========================================================================== */

/* --- 1. Primary navigation: tighten type metrics to recover the overflow --- */
[data-lang="es"] .nav-link {
  font-size: clamp(10px, 0.72vw, 11.5px);
  letter-spacing: clamp(0.2px, 0.04vw, 0.5px);
}

[data-lang="es"] .nav-menu {
  margin-left: clamp(16px, 2.4vw, 36px);
}

/* Narrow desktop band: the stock sheet already drops EN to 11px here.
   Spanish needs a further step down plus tighter inter-item gaps. */
@media (max-width: 1280px) and (min-width: 993px) {
  [data-lang="es"] .header-container { gap: 10px; }
  [data-lang="es"] .nav-menu { gap: 8px; margin-left: 14px; }
  [data-lang="es"] .nav-link { font-size: 10px; letter-spacing: 0.2px; }
  [data-lang="es"] .lang-btn { padding: 7px 8px; }
}

/* --- 2. Dropdown panels: longer ES child labels need more room, and the
       right-most panel must not run off the viewport edge. --- */
[data-lang="es"] .dropdown-menu {
  min-width: 275px;
}

[data-lang="es"] .nav-item-dropdown:nth-last-child(-n + 2) .dropdown-menu {
  left: auto;
  right: 0;
}

/* --- 3. Homepage proof tiles: five fixed columns, uppercase 12px.
       The longest ES string ("Responsabilidad financiera por la integridad
       técnica") is 51 chars vs 47 in EN. Allow long compounds to break
       rather than overflow the tile. --- */
[data-lang="es"] .proof-tile-text {
  letter-spacing: 0.3px;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* --- 4. Performance metric cards: the header row places a long title beside
       a 2.25rem numeric value. ES titles run longer; prevent the value from
       being squeezed onto a second line. --- */
[data-lang="es"] .perf-metric-title {
  font-size: 1rem;
  line-height: 1.25;
}

[data-lang="es"] .perf-metric-val {
  white-space: nowrap;
}

/* --- 5. Data figures formatted per ISO 80000 use non-breaking spaces as the
       thousands separator (450 000 km²). Guard against any residual break. --- */
[data-lang="es"] .perf-metric-val,
[data-lang="es"] .proof-tile-number {
  white-space: nowrap;
}
