/* ══════════════════════════════════════════════════════════
   LAYOUT — Macro Procesos UPV
   ══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--grey-upv-dark);
  background: var(--grey-bg);
  overflow: hidden;
}

/* ── TOP BAR ── */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--grey-upv-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 12px;
  font-family: var(--font-body);
  z-index: 200;
}

.top-bar-links { display: flex; gap: 20px; }
.top-bar a {
  color: var(--grey-medium);
  text-decoration: none;
  transition: color var(--ease);
}
.top-bar a:hover,
.top-bar a.active { color: var(--white); }

.top-bar-lang { display: flex; gap: 6px; align-items: center; }
.top-bar-lang span { color: var(--grey-medium); }

/* ── HEADER ── */
.header {
  position: fixed;
  top: var(--topbar-h); left: 0; right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 3px solid var(--red-dark);
  box-shadow: var(--shadow-sm);
  z-index: 190;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo img { height: 44px; }

.header-sep {
  width: 1px;
  height: 36px;
  background: var(--grey-medium);
}

.header-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--grey-upv-dark);
  line-height: 1.2;
}

.header-title small {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--grey-dark);
  letter-spacing: 0.02em;
}

.header-spacer { flex: 1; }

.header-counter {
  font-size: 12px;
  color: var(--grey-dark);
  font-family: var(--font-body);
  white-space: nowrap;
}

.header-counter strong {
  font-size: 14px;
  color: var(--ch-color);
  font-weight: 600;
}

.header-nav-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--grey-dark);
}

.key-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border: 1.5px solid var(--grey-medium);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--grey-upv);
  cursor: pointer;
  transition: all var(--ease);
  background: var(--grey-light);
  user-select: none;
}
.key-btn:hover {
  border-color: var(--ch-color);
  color: var(--ch-color);
  background: var(--ch-light);
}

/* ── PROGRESS BAR ── */
#progress-bar {
  position: fixed;
  top: calc(var(--topbar-h) + var(--header-h) - 2px);
  left: 0;
  height: 3px;
  background: var(--ch-color);
  transition: width var(--ease-slow), background-color var(--ease);
  z-index: 195;
  width: 0%;
}

/* ── DECK ── */
#deck {
  position: fixed;
  top: var(--chrome-h);
  left: 0; right: 0;
  bottom: var(--footer-h);
  overflow: hidden;
}

/* ── SLIDES ── */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-slow);
  overflow-y: auto;
  padding: 28px 36px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--grey-bg);
}

.slide.active {
  opacity: 1;
  pointer-events: all;
}

/* ── FOOTER ── */
.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  background: var(--grey-upv-dark);
  color: var(--grey-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 12px;
  font-family: var(--font-body);
  z-index: 200;
}

.footer-logo img {
  height: 24px;
  filter: brightness(0) invert(1) opacity(0.7);
}

.footer-copy { opacity: 0.6; }

/* ── ACCESSIBILITY ── */
*:focus-visible {
  outline: 3px solid var(--red-dark);
  outline-offset: 2px;
}
