/* ================================ PALETA DE COLORES ================================ */
:root {
  /* Fondo */
  --bg-main: #101010;
  --bg-secondary: #141414;
  --bg-tertiary: #181818;
  
  /* Texto */
  --text-main: #EBEBEB;
  --text-secondary: #A8A8A8;
  --text-muted: #555555;
  --text-title-task: #E0E0E0;
  
  /* Bordes y Líneas */
  --border-main: #2A2A2A;
  --border-panel: #3B3B3B;
  
  /* Botones */
  --btn-func-bg: #2B2B2B;
  --btn-func-hover: #262626;
  --btn-func-click: #0F0F0F;
  
  /* Tipografía y Espacios */
  --font-family: 'Poppins', sans-serif;
  --font-code: 'Cascadia Code PL', 'Monaco', 'Courier New', monospace;
  --font-size-base: 16px;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  
  /* Radios */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  
  /* Acento */
  --color-info-accent: var(--text-secondary); 
}

/* ================================ ESTILOS BASE ================================ */
* {
  box-sizing: border-box;
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- ENLACES --- */
a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--color-info-accent);
}

/* --- TÍTULOS --- */
h1, h2, h3, h4 {
  color: var(--text-title-task);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: 3.5em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.5em; }

/* --- H4 MEJORADO COMO SEPARADOR DE SECCIONES --- */
h4 { 
  color: var(--text-main);
  border-bottom: 1px solid var(--border-panel); 
  font-size: 1.4em; 
  letter-spacing: 0.05em;
  margin-top: 35px;
  margin-bottom: 15px; 
  padding-bottom: 8px;
}

p {
  margin-bottom: 1em;
}

/* --- LISTAS ESTÉTICAS GENERALES (ul, ol) --- */
ul, ol {
  list-style: none;
  margin: 0 0 1em 0;
  padding-left: 0;
}

ul li, ol li {
  line-height: 1.6;
  margin-bottom: 0.8em; 
  position: relative;
  padding-left: 0;
}

/* Se asegura que no haya indicadores de lista predeterminados */
ul li::before, ol li::before {
  content: none; 
}

ol {
  counter-reset: list-item;
}

/* --- INLINE CODE --- */
code {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 0.9em;
  padding: 2px 6px;
}

/* --- CONTENEDOR PRINCIPAL --- */
.container {
  margin: 0 auto;
  max-width: 1200px;
  padding: 40px 0;
  width: 90%;
}

/* ================================ SCROLLBAR ================================ */
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-panel);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #4A4A4A;
}

/* ================================ MATERIAL ICONS ================================ */
.material-icons-round {
  align-items: center;
  direction: ltr;
  display: inline-flex;
  font-family: 'Material Icons Rounded';
  font-size: 1em;
  font-style: normal;
  font-weight: normal;
  justify-content: center;
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
}

.icon-small { 
  font-size: 1.3em;
  line-height: 1;
}

.icon-large {
  font-size: 3.5em;
  line-height: 1;
  margin-bottom: 0.3em;
}

/* ================================ SISTEMA DE BOTONES ================================ */
.btn-primary {
  align-items: center;
  background-color: var(--btn-func-bg);
  border: 2px solid var(--border-panel);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.95em;
  font-weight: var(--font-weight-semibold);
  gap: 10px;
  justify-content: center;
  overflow: hidden;
  padding: 14px 32px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  z-index: 1;
}

.btn-primary::before {
  background: linear-gradient(90deg, transparent, rgba(235, 235, 235, 0.05), transparent); 
  content: '';
  height: 100%;
  left: -100%;
  position: absolute;
  top: 0;
  transition: left 0.5s ease;
  width: 100%;
  z-index: 0; 
}

.btn-primary:hover {
  background-color: var(--btn-func-hover);
  border-color: #505050;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  background-color: var(--btn-func-click);
  border-color: #606060;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translateY(0) scale(0.98);
}

.btn-primary[download] {
  cursor: pointer;
}

/* ================================ HEADER ================================ */
.site-header {
  backdrop-filter: blur(12px);
  background-color: rgba(16, 16, 16, 0.95);
  border-bottom: 1px solid var(--border-main);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease; /* Transición para el efecto de scroll */
}

/* EFECTO JAVASCRIPT: Header al hacer scroll */
.site-header.scrolled {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6); 
  border-bottom-color: var(--color-info-accent);
}

.header-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1300px;
  padding: 14px 0;
  width: 92%;
}

/* --- LOGO --- */
.logo a {
  color: var(--text-title-task);
  font-size: 1.4em;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.logo a:hover {
  color: var(--text-main);
}

/* --- NAVEGACIÓN PRINCIPAL --- */
.main-nav ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 24px);
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.93em;
  font-weight: var(--font-weight-regular);
  padding: 6px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.main-nav a::after {
  background-color: var(--text-main);
  bottom: 0;
  content: '';
  height: 2px;
  left: 0;
  position: absolute;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.main-nav a:hover {
  color: var(--text-main);
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a.nav-cta {
  background-color: var(--btn-func-bg);
  border: 2px solid var(--border-panel);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 transparent; /* Resetear box-shadow */
  color: var(--text-main);
  font-weight: var(--font-weight-semibold);
  padding: 8px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav a.nav-cta::after {
  display: none;
}

.main-nav a.nav-cta:hover {
  background-color: var(--btn-func-hover);
  border-color: #505050;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ================================ MAIN CONTENT ================================ */
main {
  min-height: calc(100vh - 200px);
}

section {
  border-bottom: 1px solid var(--border-main);
  overflow: hidden;
  padding: 80px 0;
  position: relative;
}

section::before {
  content: '';
  height: 100%;
  left: 0;
  opacity: 0.4;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 0;
}

section > * {
  position: relative;
  z-index: 1;
}

.download-section.alt-bg {
  background-color: var(--bg-secondary);
}

.download-section.alt-bg::before {
  background-image: radial-gradient(circle, rgba(59, 59, 59, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
}

.download-section.--main-bg {
  background-color: var(--bg-main);
}

/* --- CONTENIDO DE SECCIÓN DE DESCARGA --- */
.download-content h1 {
  margin-bottom: 12px;
  text-align: center;
}

.download-content h2 {
  margin-bottom: 12px;
}

.download-content p {
  color: var(--text-secondary);
  font-size: 0.95em;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1.1em, 2.5vw, 1.3em);
  line-height: 1.7;
  margin: 0 auto 50px auto;
  max-width: 700px;
  text-align: center;
}

.download-section h3 {
  align-items: center;
  display: flex;
  font-size: 1.8em;
  gap: 12px;
  justify-content: center; 
  margin-bottom: 30px;
  width: 100%; 
}

.download-section h3 .material-icons-round {
  color: var(--text-secondary);
  font-size: 1.6em;
}

/* ================================ ANIMACIONES JS ================================ */
.animate-up {
  /* Propiedades iniciales para la animación controlada por JS/Intersection Observer */
  opacity: 0;
  transform: translateY(20px);
  /* Mantenemos la transición aquí para un rendimiento suave */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out; 
}

.animate-up.is-visible {
  /* Clase añadida por JS para activar la animación */
  opacity: 1;
  transform: translateY(0);
}


/* ================================ REQUISITOS (Flex) ================================ */
.download-section > .container > div[style*="display: flex"] {
  display: flex !important;
  gap: 40px;
  margin-bottom: 20px;
}

.download-section > .container > div[style*="display: flex"] > div {
  flex: 1;
}

.download-section strong {
  color: var(--text-main);
  font-weight: var(--font-weight-semibold);
}

/* ================================ OPCIONES DE DESCARGA ================================ */
.download-options {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 30px;
}

.download-option {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  padding: 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-option:hover {
  background-color: var(--bg-secondary); 
  border-color: var(--color-info-accent); 
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  transform: translateY(-6px);
}

.download-option h4 {
  border-bottom: none; 
  color: var(--text-main);
  font-size: 1.3em;
  margin: 0 0 16px 0;
  padding-bottom: 0;
}

.download-option ul {
  color: var(--text-secondary);
  flex-grow: 1; 
  font-size: 0.95em;
  list-style: none;
  margin: 0 0 24px 0;
  padding-left: 0;
}

.download-option ul li {
  margin-bottom: 8px;
  padding-left: 0;
}

.download-option .btn-primary {
  justify-content: center;
  margin-top: auto; 
  width: 100%;
}

/* ================================ COMING SOON - Estética Mejorada ================================ */
.coming-soon {
  background-color: var(--bg-tertiary); 
  border: 2px dashed var(--border-main); 
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5); 
  color: var(--text-muted);
  font-size: 1.1em;
  font-style: italic;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  margin-top: 20px;
  overflow: hidden;
  padding: 30px;
  position: relative;
  text-align: center;
}

.coming-soon::before {
  color: var(--text-muted);
  content: '...';
  font-size: 4em;
  left: 50%;
  opacity: 0.1;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* ================================ INSTRUCCIONES ================================ */
.instructions-list {
  color: var(--text-secondary);
  list-style: none;
  margin-left: 0;
  padding-left: 0; 
}

.instructions-list li {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  line-height: 1.7;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 20px;
  padding-left: 20px; 
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.instructions-list li::before {
  content: none; 
}

.instructions-list li:hover {
  background-color: var(--bg-secondary); 
  border-color: var(--color-info-accent); 
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.instructions-list li strong {
  color: var(--text-main);
  display: block;
  font-size: 1.05em;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 8px;
}

/* Sub-listas dentro de las instrucciones */
.instructions-list li ul {
  border-top: 1px dashed var(--border-main);
  list-style: none;
  margin-left: 0;
  margin-top: 12px;
  padding-left: 0;
  padding-top: 12px;
}

.instructions-list li ul li {
  background-color: transparent; 
  border: none; 
  box-shadow: none;
  font-size: 0.95em;
  margin-bottom: 8px;
  padding: 0; 
  position: relative;
  transform: none;
  transition: none; 
}

.instructions-list li ul li::before {
  content: none;
}

.instructions-list li ul li:hover {
  background-color: transparent;
}

.instructions-list a {
  color: var(--text-main);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.instructions-list a:hover {
  color: var(--color-info-accent);
}

.instructions-list code {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-family: var(--font-code);
  font-size: 0.9em;
  padding: 4px 8px;
}

/* ================================ CODE BLOCKS ================================ */
.code-block {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 0.9em;
  line-height: 1.6;
  margin: 16px 0;
  overflow-x: auto;
  padding: 16px;
}

.code-block code {
  background: none;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

.code-block br::before {
  content: '';
}

/* ================================ LISTAS ESPECIALES - SECCIÓN DE DESCARGA ================================ */
.download-section ul {
  color: var(--text-secondary);
  list-style: none;
  margin-left: 0;
  padding-left: 0; 
}

.download-section ul li {
  align-items: flex-start;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  line-height: 1.6;
  margin-bottom: 14px; 
  overflow: hidden;
  padding: 14px 18px;
  padding-left: 18px; 
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-section ul li::before {
  content: none; 
}

.download-section ul li:hover {
  background-color: var(--bg-secondary); 
  border-color: var(--color-info-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateX(0); 
}

.download-section ul a {
  color: var(--text-main);
  font-weight: var(--font-weight-semibold);
  transition: color 0.3s ease;
}

.download-section ul a:hover {
  color: var(--color-info-accent);
}

/* ================================ HR ================================ */
hr {
  background-color: var(--border-main);
  border: none;
  height: 1px;
  margin: 0;
}

/* ================================ FOOTER ================================ */
.site-footer {
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-main);
  color: var(--text-secondary);
  font-size: 0.9em;
}

.footer-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1200px;
  padding: 30px 0;
  width: 90%;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.site-footer a {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--text-main);
}

.site-footer p {
  margin-bottom: 0;
}

/* ================================ RESPONSIVE ================================ */
@media (max-width: 1100px) {
  .main-nav ul {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  section {
    padding: 60px 0;
  }

  /* Aseguramos el centrado en móvil */
  .download-section h3 {
    font-size: 1.5em;
    justify-content: center;
  }

  .download-options {
    grid-template-columns: 1fr;
  }

  .download-section > .container > div[style*="display: flex"] {
    flex-direction: column;
    gap: 30px;
  }

  h1 { font-size: 2.6em; }
  h2 { font-size: 1.8em; }
  h3 { font-size: 1.3em; }

  ul li, ol li {
    padding-left: 0; 
  }
}

@media (max-width: 850px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: flex-start;
    margin-top: 8px;
  }

  .main-nav a.nav-cta {
    margin-top: 6px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 16px 0;
  }

  .main-nav ul {
    flex-wrap: wrap;
    font-size: 0.9em;
    gap: 12px 16px;
  }

  h1 { font-size: 2.2em; }
  h2 { font-size: 1.6em; }
  h3 { font-size: 1.2em; }
  h4 { font-size: 1.2em; } 

  section {
    padding: 40px 0;
  }

  .container {
    padding: 20px 0;
    width: 95%;
  }

  .download-content p {
    font-size: 0.9em;
  }

  .download-section h3 {
    font-size: 1.3em;
    justify-content: center;
    margin-bottom: 20px;
  }

  .btn-primary {
    font-size: 0.9em;
    padding: 12px 24px;
  }

  .code-block {
    font-size: 0.85em;
    padding: 12px;
  }

  .instructions-list {
    margin-left: 0; 
    padding-left: 0;
  }

  .instructions-list li {
    font-size: 0.95em;
    padding-left: 15px; 
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
  }

  .footer-inner nav {
    gap: 16px;
  }
}