/* ═══════════════════════════════════════════════════════════
   SEGURIDAD INFORMÁTICA II — Stylesheet
   Estética: Cyberpunk / Dark Tech / Neon
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #060a0f;
  --bg2:       #0c1117;
  --bg3:       #111820;
  --border:    rgba(0,240,255,0.1);
  --border2:   rgba(0,240,255,0.2);
  --cyan:      #00f0ff;
  --cyan-dim:  rgba(0,240,255,0.6);
  --blue:      #4e9ef5;
  --purple:    #a855f7;
  --orange:    #f5a623;
  --red:       #ff3c5f;
  --green:     #00ff9d;
  --teal:      #14b8a6;
  --text:      #d4e0ec;
  --text-dim:  #6b7f96;
  --font-head: 'Orbitron', monospace;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --radius:    12px;
  --radius-lg: 18px;
  --trans:     0.28s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
}

/* ── SCANLINES ── */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,10,15,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.logo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0,240,255,0.5));
}
.logo-icon svg { width: 100%; height: 100%; }
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.logo-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1.2;
}
.logo-title em {
  font-style: normal;
  color: var(--cyan);
}
.logo-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.nav-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan-dim);
  border: 1px solid var(--border2);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: rgba(0,240,255,0.05);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── TICKER ── */
.ticker-wrap {
  background: rgba(0,240,255,0.04);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 9px 0;
  position: relative;
}
.ticker-wrap::before,
.ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker-wrap::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 60s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tick-item {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan-dim);
  letter-spacing: 0.08em;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}
.tick-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── HERO ── */
.hero {
  position: relative;
  width: 100%;
  height: clamp(280px, 42vw, 520px);
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(6,10,15,0.88) 0%, rgba(6,10,15,0.65) 38%, rgba(6,10,15,0.15) 65%, rgba(6,10,15,0.05) 100%),
    linear-gradient(to bottom, rgba(6,10,15,0.05) 0%, rgba(6,10,15,0.3) 55%, rgba(6,10,15,0.95) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,240,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to right, rgba(0,0,0,0.3) 0%, transparent 60%);
}
.hero-content {
  position: absolute;
  bottom: clamp(1.5rem, 5vw, 3.5rem);
  left: clamp(1.25rem, 5vw, 4rem);
  max-width: min(560px, 55vw);
}
.hero-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}
.hero-title {
  font-family: var(--font-head);
  line-height: 1.0;
  margin-bottom: 0.9rem;
  text-shadow: 0 0 40px rgba(0,240,255,0.3);
}
.hero-title-line1 {
  display: block;
  font-size: clamp(1.4rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.12em;
}
.hero-title-line2 {
  display: block;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.06em;
}
.hero-title-line2 em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 30px var(--cyan), 0 0 60px rgba(0,240,255,0.4);
}
.hero-desc {
  font-size: clamp(0.8rem, 1.4vw, 0.92rem);
  color: rgba(212,224,236,0.7);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 420px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 20px rgba(0,240,255,0.5);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stat-div {
  width: 1px;
  height: 32px;
  background: var(--border2);
}
@media (max-width: 600px) {
  .hero-content { max-width: 90vw; }
  .hero-title-line1 { font-size: clamp(1rem, 5vw, 1.6rem); }
  .hero-title-line2 { font-size: clamp(1.5rem, 7vw, 2.4rem); }
  .hero-desc { font-size: 0.82rem; }
}

/* ── UNITS TABS ── */
.units-section {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 62px;
  z-index: 80;
}
.units-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.units-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.units-tabs {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.units-tabs::-webkit-scrollbar { display: none; }

.unit-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--trans), border-color var(--trans);
  letter-spacing: 0.02em;
}
.unit-tab:hover:not(.locked) {
  color: var(--text);
}
.unit-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.unit-tab.locked {
  opacity: 0.4;
  cursor: default;
}
.tab-num {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: inherit;
  letter-spacing: 0.05em;
}
.tab-name {
  font-size: 12px;
}
.tab-lock {
  font-size: 11px;
  opacity: 0.7;
}

/* ── CARDS SECTION ── */
.cards-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ── UNIT PANEL ── */
.unit-panel {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.35s ease;
}
.unit-panel.active {
  display: flex;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.unit-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.unit-panel-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.unit-num-badge {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(0,240,255,0.08);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
}
.unit-num-badge.u2 { color: var(--blue); background: rgba(78,158,245,0.08); border-color: rgba(78,158,245,0.2); }
.unit-num-badge.u3 { color: var(--purple); background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.2); }
.unit-num-badge.u4 { color: var(--orange); background: rgba(245,166,35,0.08); border-color: rgba(245,166,35,0.2); }
.unit-num-badge.u5 { color: var(--red); background: rgba(255,60,95,0.08); border-color: rgba(255,60,95,0.2); }
.unit-num-badge.u6 { color: var(--green); background: rgba(0,255,157,0.08); border-color: rgba(0,255,157,0.2); }

.unit-title {
  font-family: var(--font-head);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}
.unit-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.collapse-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--trans), color var(--trans);
}
.collapse-btn:hover { background: rgba(0,240,255,0.08); color: var(--cyan); }
.collapse-btn svg { width: 18px; height: 18px; transition: transform var(--trans); }
.collapse-btn.collapsed svg { transform: rotate(180deg); }

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}
.unit-content {
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1);
  max-height: 2000px;
}
.unit-content.collapsed {
  max-height: 0;
}

/* ── CARD ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity var(--trans);
  pointer-events: none;
}
.card[data-accent="cyan"]::after    { box-shadow: inset 0 0 0 1px rgba(0,240,255,0.4); }
.card[data-accent="blue"]::after    { box-shadow: inset 0 0 0 1px rgba(78,158,245,0.4); }
.card[data-accent="purple"]::after  { box-shadow: inset 0 0 0 1px rgba(168,85,247,0.4); }
.card[data-accent="orange"]::after  { box-shadow: inset 0 0 0 1px rgba(245,166,35,0.4); }
.card[data-accent="red"]::after     { box-shadow: inset 0 0 0 1px rgba(255,60,95,0.4); }
.card[data-accent="green"]::after   { box-shadow: inset 0 0 0 1px rgba(0,255,157,0.4); }
.card[data-accent="teal"]::after    { box-shadow: inset 0 0 0 1px rgba(20,184,166,0.4); }

@media (hover: hover) {
  .card:not(.card-coming):hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(0,240,255,0.1);
  }
  .card[data-accent="cyan"]:hover    { border-color: rgba(0,240,255,0.3); box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(0,240,255,0.15); }
  .card[data-accent="blue"]:hover    { border-color: rgba(78,158,245,0.3); box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(78,158,245,0.15); }
  .card[data-accent="purple"]:hover  { border-color: rgba(168,85,247,0.3); box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(168,85,247,0.15); }
  .card[data-accent="orange"]:hover  { border-color: rgba(245,166,35,0.3); box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(245,166,35,0.15); }
  .card[data-accent="red"]:hover     { border-color: rgba(255,60,95,0.3);  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(255,60,95,0.15); }
  .card[data-accent="green"]:hover   { border-color: rgba(0,255,157,0.3);  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(0,255,157,0.15); }
  .card:not(.card-coming):hover::after { opacity: 1; }
  .card:not(.card-coming):hover .card-click-hint { opacity: 1; }
}

/* ── CARD IMAGE ── */
.card-img-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: var(--bg3);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.card:not(.card-coming):hover .card-img-wrap img {
  transform: scale(1.05);
}
.card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(6,10,15,0.6) 70%,
    rgba(6,10,15,0.9) 100%
  );
}
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: rgba(0,240,255,0.1);
  border: 1px solid rgba(0,240,255,0.25);
  border-radius: 100px;
  padding: 3px 10px;
  text-transform: uppercase;
}
.card-click-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(0,240,255,0.8);
  background: rgba(0,240,255,0.08);
  border: 1px solid rgba(0,240,255,0.2);
  border-radius: 100px;
  padding: 4px 10px;
  opacity: 0;
  transition: opacity var(--trans);
}
.card-click-hint svg { width: 12px; height: 12px; }

/* Card coming */
.card-coming-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
}
.card-coming-icon {
  color: rgba(20,184,166,0.3);
}
.card-coming-icon svg { width: 64px; height: 64px; }

/* ── CARD BODY ── */
.card-body {
  padding: 1.1rem 1.25rem 0.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card-title {
  font-family: var(--font-head);
  font-size: clamp(0.78rem, 1.5vw, 0.9rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.card-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan-dim);
  letter-spacing: 0.05em;
}
.card[data-accent="blue"] .card-subtitle   { color: rgba(78,158,245,0.8); }
.card[data-accent="purple"] .card-subtitle { color: rgba(168,85,247,0.8); }
.card[data-accent="orange"] .card-subtitle { color: rgba(245,166,35,0.8); }
.card[data-accent="red"] .card-subtitle    { color: rgba(255,60,95,0.8); }
.card[data-accent="green"] .card-subtitle  { color: rgba(0,255,157,0.8); }
.card[data-accent="teal"] .card-subtitle   { color: rgba(20,184,166,0.8); }

.card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── CARD FOOTER ── */
.card-footer {
  padding: 0.8rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color var(--trans);
}
.footer-hint svg { width: 14px; height: 14px; }
.card:not(.card-coming):hover .footer-hint {
  color: var(--cyan);
}
.card[data-accent="blue"]:hover .footer-hint   { color: var(--blue); }
.card[data-accent="purple"]:hover .footer-hint { color: var(--purple); }
.card[data-accent="orange"]:hover .footer-hint { color: var(--orange); }
.card[data-accent="red"]:hover .footer-hint    { color: var(--red); }
.card[data-accent="green"]:hover .footer-hint  { color: var(--green); }
.footer-hint.coming { color: rgba(20,184,166,0.5); }

/* ── COMING SOON ── */
.coming-soon-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}
.coming-soon-msg {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
}
.coming-soon-msg svg { width: 48px; height: 48px; color: var(--text-dim); opacity: 0.4; }
.coming-soon-msg h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.coming-soon-msg p { font-size: 13px; color: rgba(107,127,150,0.7); }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.footer-logo-col {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-icon svg { width: 36px; height: 36px; }
.footer-title {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.footer-sub { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
.footer-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(107,127,150,0.6);
  letter-spacing: 0.04em;
}
.footer-sep { opacity: 0.4; }

/* ═══════════════════════════════════════
   MODAL PRESENTATION
   ═══════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.modal-container {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%;
  max-width: 1100px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 60px rgba(0,240,255,0.08);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Fullscreen modal */
.modal-container.fullscreen {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}
.modal-title-group {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.modal-unit-badge {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0,240,255,0.08);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 4px 8px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  margin-top: 2px;
}
.modal-title {
  font-family: var(--font-head);
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
.modal-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.modal-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
  white-space: nowrap;
}
.modal-btn svg { width: 15px; height: 15px; }
.modal-btn:hover {
  background: rgba(0,240,255,0.08);
  border-color: var(--border2);
  color: var(--cyan);
}
.modal-btn-close {
  padding: 0.45rem;
  width: 36px;
  height: 36px;
  justify-content: center;
}
.modal-btn-close:hover { background: rgba(255,60,95,0.1); border-color: rgba(255,60,95,0.3); color: var(--red); }

/* ── SLIDESHOW ── */
.slideshow-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
  overflow: hidden;
}
.slideshow {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
}

/* HTML Slide */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}
.slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* Slide image mode */
.slide-img-mode {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Slide content layout */
.slide-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3rem;
  position: relative;
  overflow-y: auto;
}
.slide-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.slide-inner.title-slide {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slide-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.8;
  position: relative;
}
.slide-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  position: relative;
}
.slide-h1 em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0,240,255,0.4);
}
.slide-h2 {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.slide-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  position: relative;
}
.slide-body.full { grid-template-columns: 1fr; }
.slide-body.thirds { grid-template-columns: 1fr 1fr 1fr; }
.slide-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.slide-p {
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 1.3vw, 0.95rem);
  color: var(--text);
  line-height: 1.7;
}
.slide-p strong { color: var(--cyan); font-weight: 600; }
.slide-ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.slide-ul li {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
}
.slide-ul li::before {
  content: '▹';
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 0.05em;
  font-size: 0.75em;
}
.slide-img-wrap {
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.slide-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slide-box {
  background: rgba(0,240,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.slide-box-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  opacity: 0.8;
}
.slide-num {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 30px rgba(0,240,255,0.4);
  line-height: 1;
}
.slide-divider {
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.5;
  margin: 0.5rem 0;
}
.osi-layers {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.osi-layer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
.osi-num {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.osi-name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  flex: 1;
}
.osi-prot {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}
.osi-l7 { background: rgba(255,60,95,0.08); border-color: rgba(255,60,95,0.15); }
.osi-l7 .osi-num { color: var(--red); }
.osi-l6 { background: rgba(245,166,35,0.08); border-color: rgba(245,166,35,0.15); }
.osi-l6 .osi-num { color: var(--orange); }
.osi-l5 { background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.15); }
.osi-l5 .osi-num { color: var(--purple); }
.osi-l4 { background: rgba(78,158,245,0.08); border-color: rgba(78,158,245,0.15); }
.osi-l4 .osi-num { color: var(--blue); }
.osi-l3 { background: rgba(0,240,255,0.08); border-color: rgba(0,240,255,0.15); }
.osi-l3 .osi-num { color: var(--cyan); }
.osi-l2 { background: rgba(0,255,157,0.08); border-color: rgba(0,255,157,0.15); }
.osi-l2 .osi-num { color: var(--green); }
.osi-l1 { background: rgba(20,184,166,0.08); border-color: rgba(20,184,166,0.15); }
.osi-l1 .osi-num { color: var(--teal); }

/* ── SLIDE NAV ── */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  background: rgba(6,10,15,0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--trans), border-color var(--trans), color var(--trans);
  backdrop-filter: blur(8px);
}
.slide-nav:hover { background: rgba(0,240,255,0.12); border-color: var(--border2); color: var(--cyan); }
.slide-nav svg { width: 22px; height: 22px; }
.slide-prev { left: 12px; }
.slide-next { right: 12px; }

/* ── SLIDESHOW FOOTER ── */
.slideshow-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.slide-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 50px;
}
#slide-current { color: var(--cyan); font-weight: 600; }
.slide-progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  min-width: 60px;
}
.slide-progress-fill {
  height: 100%;
  background: var(--cyan);
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 6px var(--cyan);
}
.slide-thumbnails {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  max-width: 300px;
  scrollbar-width: none;
}
.slide-thumbnails::-webkit-scrollbar { display: none; }
.slide-thumb {
  width: 42px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--trans);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}
.slide-thumb.active { border-color: var(--cyan); }
.slide-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .slide-body { grid-template-columns: 1fr; }
  .slide-body.thirds { grid-template-columns: 1fr; }
  .slide-inner { padding: 1.5rem 1.5rem; }
}
@media (max-width: 640px) {
  .modal { padding: 0; }
  .modal-container { border-radius: 0; height: 100%; max-height: 100%; }
  .modal-btn span:not(.sr-only) { display: none; }
  .modal-btn { padding: 0.45rem 0.6rem; }
  .units-section { top: 56px; }
  .unit-panel-header { flex-wrap: wrap; }
  .slideshow-footer { gap: 0.5rem; }
  .slide-thumbnails { display: none; }
  .slide-inner { padding: 1.25rem; }
}

/* ═══════════════════════════════════════
   MODO CLARO (PROYECTOR)
   ═══════════════════════════════════════ */

/* Botón modo claro en navbar */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--trans);
  white-space: nowrap;
}
.mode-toggle:hover {
  background: rgba(0,240,255,0.08);
  border-color: var(--border2);
  color: var(--cyan);
}
.mode-toggle svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── MODO CLARO — variables ── */
body.light-mode {
  --bg:       #f0f4f8;
  --bg2:      #ffffff;
  --bg3:      #e8edf3;
  --border:   rgba(0,90,120,0.15);
  --border2:  rgba(0,90,120,0.3);
  --cyan:     #0077aa;
  --cyan-dim: rgba(0,119,170,0.7);
  --blue:     #1a5fbd;
  --purple:   #7c3aed;
  --orange:   #c47600;
  --red:      #cc1a38;
  --green:    #007a44;
  --teal:     #0d7566;
  --text:     #1a2332;
  --text-dim: #4a5a6e;
  background: var(--bg);
  color: var(--text);
}

body.light-mode .scanlines { display: none; }

body.light-mode .navbar {
  background: rgba(240,244,248,0.97);
  border-bottom: 1px solid rgba(0,90,120,0.15);
}
body.light-mode .logo-title { color: #1a2332; }
body.light-mode .logo-sub { color: #4a5a6e; }
body.light-mode .nav-badge {
  background: rgba(0,119,170,0.08);
  border-color: rgba(0,119,170,0.25);
  color: rgba(0,119,170,0.8);
}
body.light-mode .badge-dot { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

body.light-mode .ticker-wrap {
  background: rgba(0,119,170,0.06);
  border-bottom: 1px solid rgba(0,119,170,0.15);
}
body.light-mode .tick-item { color: rgba(0,119,170,0.8); }

body.light-mode .hero-overlay {
  background:
    linear-gradient(to right, rgba(240,244,248,0.9) 0%, rgba(240,244,248,0.65) 38%, rgba(240,244,248,0.15) 65%, rgba(240,244,248,0.0) 100%),
    linear-gradient(to bottom, rgba(240,244,248,0.0) 0%, rgba(240,244,248,0.2) 55%, rgba(240,244,248,0.97) 100%);
}
body.light-mode .hero-title { text-shadow: 0 0 30px rgba(0,119,170,0.3); }
body.light-mode .hero-title-line1 { color: rgba(26,35,50,0.6); }
body.light-mode .hero-title-line2 { color: #1a2332; }
body.light-mode .hero-title-line2 em { color: var(--cyan); text-shadow: 0 0 20px rgba(0,119,170,0.4); }
body.light-mode .hero-tag { color: var(--cyan); }
body.light-mode .hero-desc { color: rgba(26,35,50,0.7); }
body.light-mode .stat-num { color: var(--cyan); text-shadow: none; }
body.light-mode .stat-label { color: var(--text-dim); }
body.light-mode .stat-div { background: rgba(0,90,120,0.2); }
body.light-mode .hero-grid {
  background-image:
    linear-gradient(rgba(0,90,120,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,90,120,0.06) 1px, transparent 1px);
}

body.light-mode .units-section { background: #fff; border-bottom: 1px solid rgba(0,90,120,0.15); }
body.light-mode .unit-tab { color: #4a5a6e; }
body.light-mode .unit-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
body.light-mode .units-label { color: #4a5a6e; }

body.light-mode .unit-panel-header { background: #fff; border-color: rgba(0,90,120,0.15); }
body.light-mode .unit-panel-header::before { background: var(--cyan); box-shadow: none; }
body.light-mode .unit-title { color: #1a2332; }
body.light-mode .unit-subtitle { color: #4a5a6e; }
body.light-mode .unit-num-badge { background: rgba(0,119,170,0.08); border-color: rgba(0,119,170,0.25); color: var(--cyan); }
body.light-mode .collapse-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,90,120,0.15); color: #4a5a6e; }

body.light-mode .card { background: #fff; border-color: rgba(0,90,120,0.15); }
body.light-mode .card-title { color: #1a2332; }
body.light-mode .card-desc { color: #4a5a6e; }
body.light-mode .tag { background: rgba(0,0,0,0.05); border-color: rgba(0,90,120,0.15); color: #4a5a6e; }
body.light-mode .card-footer { border-top-color: rgba(0,90,120,0.1); }

body.light-mode .coming-soon-msg h3 { color: #4a5a6e; }
body.light-mode .coming-soon-msg p { color: #6a7a8e; }

body.light-mode .site-footer { background: #fff; border-top-color: rgba(0,90,120,0.12); }
body.light-mode .footer-title { color: var(--cyan); }
body.light-mode .footer-sub { color: #4a5a6e; }
body.light-mode .footer-info { color: #6a7a8e; }

/* Modal en modo claro */
body.light-mode .modal-container {
  background: #fff;
  border-color: rgba(0,90,120,0.2);
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}
body.light-mode .modal-backdrop { background: rgba(200,210,220,0.85); }
body.light-mode .modal-header { border-bottom-color: rgba(0,90,120,0.12); }
body.light-mode .modal-title { color: #1a2332; }
body.light-mode .modal-subtitle { color: #4a5a6e; }
body.light-mode .modal-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,90,120,0.15); color: #4a5a6e; }
body.light-mode .modal-btn:hover { background: rgba(0,119,170,0.08); border-color: rgba(0,119,170,0.3); color: var(--cyan); }
body.light-mode .slideshow-wrap { background: #f5f8fa; }
body.light-mode .slideshow-footer { border-top-color: rgba(0,90,120,0.12); }
body.light-mode .slide-counter { color: #4a5a6e; }
body.light-mode .slide-progress-bar { background: rgba(0,0,0,0.08); }
body.light-mode .slide-thumb { background: #e8edf3; border-color: rgba(0,90,120,0.15); color: #4a5a6e; }
body.light-mode .slide-nav { background: rgba(240,244,248,0.9); border-color: rgba(0,90,120,0.2); color: #1a2332; }

/* Slides en modo claro */
body.light-mode .slide { background: #f5f8fa; }
body.light-mode .slide-inner::before {
  background-image:
    linear-gradient(rgba(0,90,120,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,90,120,0.05) 1px, transparent 1px);
}
body.light-mode .slide-h1 { color: #1a2332; }
body.light-mode .slide-h1 em { color: var(--cyan); text-shadow: none; }
body.light-mode .slide-h2 { color: var(--cyan); border-bottom-color: rgba(0,90,120,0.15); }
body.light-mode .slide-tag { color: var(--cyan); }
body.light-mode .slide-p { color: #1a2332; }
body.light-mode .slide-p strong { color: var(--cyan); }
body.light-mode .slide-ul li { color: #1a2332; }
body.light-mode .slide-ul li::before { color: var(--cyan); }
body.light-mode .slide-box { background: rgba(0,119,170,0.05); border-color: rgba(0,119,170,0.18); }
body.light-mode .slide-box-title { color: var(--cyan); }
body.light-mode .slide-num { color: var(--cyan); text-shadow: none; }
body.light-mode .osi-prot { color: #5a6a7e; }
body.light-mode .osi-l7 { background: rgba(204,26,56,0.06); border-color: rgba(204,26,56,0.18); }
body.light-mode .osi-l6 { background: rgba(196,118,0,0.06); border-color: rgba(196,118,0,0.18); }
body.light-mode .osi-l5 { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.18); }
body.light-mode .osi-l4 { background: rgba(26,95,189,0.06); border-color: rgba(26,95,189,0.18); }
body.light-mode .osi-l3 { background: rgba(0,119,170,0.06); border-color: rgba(0,119,170,0.18); }
body.light-mode .osi-l2 { background: rgba(0,122,68,0.06); border-color: rgba(0,122,68,0.18); }
body.light-mode .osi-l1 { background: rgba(13,117,102,0.06); border-color: rgba(13,117,102,0.18); }
body.light-mode .slide-divider { color: var(--cyan); }

/* ── MODO PROYECTOR — letras más grandes y más brillantes ── */
body.light-mode .slide-p { font-size: clamp(1rem, 1.6vw, 1.15rem); font-weight: 500; }
body.light-mode .slide-ul li { font-size: clamp(0.95rem, 1.5vw, 1.1rem); font-weight: 500; }
body.light-mode .slide-h2 { font-size: clamp(1.15rem, 2.5vw, 1.7rem); }
body.light-mode .slide-h1 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
body.light-mode .slide-box-title { font-size: 12px; }
body.light-mode .osi-name { font-size: 13px; }
body.light-mode .osi-prot { font-size: 11px; }
body.light-mode .slide-tag { font-size: 12px; }
body.light-mode .modal-title { font-size: clamp(0.9rem, 2vw, 1.1rem); }

