@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

/*
  Override aislado para workshop-ia.html.
  styles.css debe cargarse primero y este archivo después.
*/

:root {
  --ai-bg: #02040d;
  --ai-bg-soft: #070b18;
  --ai-panel: rgba(8, 12, 28, 0.96);
  --ai-white: #f8f6f2;
  --ai-pink: #ff6ea8;
  --ai-cyan: #13e0e6;
  --ai-purple: #a86eea;
  --ai-yellow: #ffd319;
  --ai-muted: #aeb5c7;
  --ai-line: rgba(255, 255, 255, 0.12);
  --ai-glow: 0 0 24px rgba(19, 224, 230, 0.13);
  --site-nav-height: 0px;
  --slide-nav-height: 44px;
  --slide-nav-offset: 44px;
  --deck-max: 1720px;
}

html {
  scroll-behavior: smooth;
  background: var(--ai-bg);
}

body.ai-workshop {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -20%, rgba(62, 78, 148, 0.16), transparent 34rem),
    linear-gradient(180deg, #02030a 0%, var(--ai-bg) 100%);
  color: var(--ai-white);
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  overflow-x: hidden;
}

body.ai-workshop *,
body.ai-workshop *::before,
body.ai-workshop *::after {
  box-sizing: border-box;
}

body.ai-workshop a {
  color: inherit;
  text-decoration: none;
  border-bottom: 0;
}

body.ai-workshop a:hover {
  border-bottom: 0;
}

body.ai-workshop main {
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--ai-white);
  color: #111 !important;
  transform: translateY(-160%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navegación local por anchors: compacta y pegada al top. */
.slide-nav {
  position: sticky;
  top: 0;
  z-index: 300;
  width: 100%;
  min-height: var(--slide-nav-height);
  overflow-x: auto;
  background: rgba(4, 7, 18, 0.96);
  border-bottom: 1px solid rgba(19, 224, 230, 0.24);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.slide-nav::-webkit-scrollbar {
  display: none;
}

.slide-nav__track {
  display: flex;
  width: max-content;
  min-width: 100%;
  justify-content: center;
  align-items: stretch;
}

.slide-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--slide-nav-height);
  padding: 0.3rem clamp(0.62rem, 1.25vw, 1.05rem);
  color: var(--ai-muted);
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.035em;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.slide-nav a::after {
  content: "";
  position: absolute;
  right: 16%;
  bottom: 0;
  left: 16%;
  height: 2px;
  background: linear-gradient(90deg, var(--ai-pink), var(--ai-cyan));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.slide-nav a:hover,
.slide-nav a:focus-visible,
.slide-nav a[aria-current="true"] {
  color: var(--ai-white);
  background: rgba(255, 255, 255, 0.025);
  outline: none;
}

.slide-nav a[aria-current="true"]::after,
.slide-nav a:hover::after,
.slide-nav a:focus-visible::after {
  transform: scaleX(1);
}

.slide-nav__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.slide-deck {
  display: block;
  width: 100%;
}

.slide-panel {
  position: relative;
  display: grid;
  min-height: calc(100svh - var(--slide-nav-offset));
  place-items: start center;
  padding: clamp(0.55rem, 1.2vw, 1.15rem) clamp(0.45rem, 1.4vw, 1.4rem);
  scroll-margin-top: var(--slide-nav-offset);
  border-bottom: 1px solid var(--ai-line);
  isolation: isolate;
}

.slide-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(71, 93, 202, 0.08), transparent 66%);
  filter: blur(24px);
}

.slide-frame {
  width: fit-content;
  max-width: min(100%, var(--deck-max));
  margin: 0;
  overflow: hidden;
  background: #02040b;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: clamp(0.35rem, 1vw, 0.8rem);
  box-shadow:
    0 26px 88px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(19, 224, 230, 0.025),
    var(--ai-glow);
}

.slide-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100svh - var(--slide-nav-offset) - 1.1rem);
  margin: 0;
  object-fit: contain;
  background: #02040b;
}

.slide-panel:target .slide-frame,
.slide-panel.is-active .slide-frame {
  border-color: rgba(19, 224, 230, 0.24);
  box-shadow:
    0 26px 88px rgba(0, 0, 0, 0.54),
    0 0 0 1px rgba(255, 110, 168, 0.06),
    0 0 42px rgba(19, 224, 230, 0.12);
}

.workshop-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  padding: 1.6rem 1rem 2rem;
  background: #010208;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ai-muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.045em;
  text-align: center;
}

.workshop-footer a {
  color: var(--ai-cyan) !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 980px) {
  :root {
    --slide-nav-height: 42px;
    --slide-nav-offset: 42px;
  }

  .slide-nav__track {
    justify-content: flex-start;
  }

  .slide-nav a {
    min-height: var(--slide-nav-height);
  }

  .slide-nav__label {
    font-size: 0.78rem;
  }

  .slide-panel {
    min-height: auto;
    padding-block: clamp(1rem, 4vw, 2.5rem);
  }
}

@media (max-width: 680px) {
  body.ai-workshop {
    font-size: 16px;
  }

  .slide-nav a {
    padding-inline: 0.62rem;
  }

  .slide-nav__label {
    font-size: 0.74rem;
  }

  .slide-panel {
    padding-inline: 0;
  }

  .slide-frame {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .workshop-footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .slide-nav a,
  .slide-nav a::after,
  .skip-link {
    transition: none;
  }
}

/* Encabezado y recursos contextuales del workshop. */
.workshop-header {
  width: min(calc(100% - 2rem), 1180px);
  margin: 0 auto;
  padding: clamp(2.8rem, 7vw, 6.2rem) 0 clamp(1.2rem, 2.4vw, 2rem);
}

.workshop-eyebrow {
  margin: 0 0 0.72rem;
  color: var(--ai-purple);
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(0.82rem, 1.3vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.workshop-title {
  max-width: 15ch;
  margin: 0;
  color: var(--ai-white);
  font-family: "Bebas Neue", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(3.35rem, 8vw, 7.2rem);
  font-weight: 400;
  letter-spacing: 0.018em;
  line-height: 0.92;
  text-wrap: balance;
}

.workshop-intro {
  position: relative;
  width: min(calc(100% - 2rem), 1100px);
  margin: 0 auto clamp(1.8rem, 4vw, 3.4rem);
  padding: clamp(0.3rem, 1vw, 0.75rem) 0 clamp(0.3rem, 1vw, 0.75rem) clamp(1.1rem, 2vw, 1.65rem);
  border-left: 2px solid rgba(255, 110, 168, 0.78);
}

.workshop-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  width: 2px;
  height: 36%;
  background: var(--ai-cyan);
  box-shadow: 0 0 16px rgba(19, 224, 230, 0.42);
}

.workshop-intro p {
  max-width: 72ch;
  margin: 0;
  color: rgba(248, 246, 242, 0.92);
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(1.22rem, 2.05vw, 1.65rem);
  font-weight: 400;
  letter-spacing: 0.012em;
  line-height: 1.48;
}

.workshop-resource-placement {
  display: flex;
  width: min(calc(100% - 2rem), var(--deck-max));
  margin: 0 auto clamp(1.3rem, 3vw, 2.6rem);
  justify-content: flex-start;
}

.workshop-resource-link {
  display: inline-block;
  width: fit-content;
  margin-top: clamp(0.9rem, 1.6vw, 1.35rem);
  padding: 0 0 0.2rem;
  color: rgba(226, 232, 244, 0.86) !important;
  border-bottom: 1px solid rgba(19, 224, 230, 0.46) !important;
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(0.94rem, 1.35vw, 1.08rem);
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.25;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.workshop-resource-link:hover,
.workshop-resource-link:focus-visible {
  color: var(--ai-white) !important;
  border-bottom-color: var(--ai-cyan) !important;
  outline: none;
}

.workshop-resource-placement .workshop-resource-link {
  margin-top: 0;
}

.slide-panel > .workshop-resource-link {
  justify-self: center;
}

@media (max-width: 680px) {
  .workshop-header {
    width: calc(100% - 2rem);
    padding-top: 2.4rem;
    padding-bottom: 1.25rem;
  }

  .workshop-title {
    max-width: 12ch;
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

  .workshop-intro {
    width: calc(100% - 2rem);
    margin-bottom: 2rem;
    padding-left: 1rem;
  }

  .workshop-intro p {
    font-size: 1.16rem;
    line-height: 1.5;
  }

  .workshop-resource-placement {
    width: calc(100% - 2rem);
    margin-bottom: 1.8rem;
  }

  .slide-panel > .workshop-resource-link {
    max-width: calc(100% - 2rem);
    margin-inline: 1rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workshop-resource-link {
    transition: none;
  }
}
