/* =========================
   1. VARIABLES (Raíz)                  
   2. GLOBAL / SECCIONES                
   3. COMPONENTE: HOW TO USE            
   4. 4. INPUTS, SELECTS Y BOTONES
   5. RELATED TOOLS
   6. RESPONSIVE
  ========================= */


:root {
    --bg-dark: #121212;        /* Gris antracita muy oscuro (no negro puro) */
    --bg-darker: #0a0a0a;      /* Negro puro para contrastar secciones */
    --bg-input: #1a1a1a;       /* Gris grafito para los campos */
    --bg-output: #161616;
    --accent: #e5e5e5;         /* Platino / Gris muy claro (Sustituye al amarillo) */
    --accent-hover: #ffffff;   /* Blanco puro al interactuar */
    --link-color: #a3a3a3;     /* Enlaces en gris medio para no distraer */
    --text-main: #ededed;      /* Blanco suave para no cansar la vista */
    --text-muted: #888888;     /* Gris neutro para párrafos */
    --border: #262626;         /* Bordes de baja visibilidad */
}

/* =========================
   2. GLOBAL / SECCIONES
   ========================= */
* { box-sizing: border-box; }

section { padding: 64px 0; }
.section-dark { background: var(--bg-dark); }
.section-darker { background: var(--bg-darker); }

.faq-container,
.example,
.seo-content,
.why-echo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 16px;
    line-height: 1.8;
}

/* Títulos Globales */
:is(.faq-container, .how-to-use, .example, .seo-content, .why-echo) :is(h1, h2, h3) {
    margin: 35px 0 16px;
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--accent);
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Párrafos y Enlaces */
:is(.faq-container, .example, .seo-content, .why-echo) p {
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 1.1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
a:hover { color: var(--accent); }

/* =========================
   3. COMPONENTE: HOW TO USE
   ========================= */
.how-to-use {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 40px 16px;
    gap: 40px;
    position: relative;
    top: 50px; /* Mantiene tu ajuste de posición */
}

.how-to-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    max-width: 520px;
}

.how-to-text h2 { margin: 0; line-height: 1.2; font-size: 1.5rem; }
.how-to-text p {
    margin: 0;
    line-height: 1.6;
    color: #5f5f5f; /* O el color que desees */
}

.how-to-text ol { 
    list-style: none; 
    padding: 0; 
    margin: 16px 0; 
    counter-reset: step; 
}

.how-to-text ol li {
    counter-increment: step;
    position: relative;
    padding-left: 44px;
    margin-bottom: 14px;
    line-height: 1.5;
    text-align: justify;
    word-break: break-word;
}

.how-to-text ol li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #000; /* Fondo negro para el círculo del número */
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.how-to-box {
    flex: 1;
    min-height: 400px;
    background: #101316;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px;
}

.how-to-content { 
    max-width: 420px; 
    width: 100%; 
    position: relative; 
    top: -15px; 
}

.how-to-box pre {
    text-align: left;
    background: #0f0f0f;
    color: #eaeaea;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 24px auto;
}

.how-to-note { font-size: 0.9rem; opacity: 0.85; margin-top: 12px; }

/* =========================
   4. INPUTS, SELECTS Y BOTONES (ACTUALIZADO)
   ========================= */
select, input[type="number"], textarea, .input-field {
    padding: 12px 16px; /* Un poco más de aire */
    font-size: 14px;
    border-radius: 12px; /* Bordes más modernos */
    background: var(--bg-input);
    color: #fff;
    border: 1px solid var(--border);
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}

select:focus, input:focus {
    border-color: var(--primary); /* Usa el morado al hacer foco */
}

textarea { min-height: 220px; resize: vertical; }

#preview, .output-box, .output, #outputText {
    min-height: 80px;
    padding: 20px;
    margin-top: 18px;
    background: var(--bg-output);
    border-radius: 12px;
    border: 1px solid var(--border);
    white-space: pre-wrap;
    font-size: 15px;
    color: #a5b4fc; /* Color de texto más "código" */
}

.btn-row { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

/* Base para todos los botones */
.btn-small, .btn-tool {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* EL BOTÓN QUE ANTES ESTABA BLANCO (Generar/Enviar) */
/* Asegúrate de añadir la clase 'btn-primary' a tus botones principales en el HTML */
.btn-primary {
    background: var(--accent-gradient); /* El gradiente morado/lila */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(129, 140, 248, 0.5);
    filter: brightness(1.1);
}

/* EL BOTÓN SECUNDARIO (Limpiar/Copiar) */
/* Usa la clase 'btn-secondary' en el HTML */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* --- RELATED TOOLS PREMIUM GLOOM --- */

.related-tools {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.related-tools h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.related-tools ul {
  display: grid;
  /* Crea una cuadrícula de 4 columnas que se adapta a móviles */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 0;
  list-style: none;
}

.related-tools li {
  position: relative;
}

.related-tools li a {
  display: block;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* EFECTO HOVER PREMIUM */
.related-tools li a:hover {
  background: rgba(129, 140, 248, 0.05); /* Tono Indigo muy suave */
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px var(--primary-glow);
}

/* FLECHA INDICADORA (Pseudo-elemento) */
.related-tools li a::after {
  content: '→';
  position: absolute;
  right: 20px;
  bottom: 20px;
  opacity: 0;
  color: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-10px);
}

.related-tools li a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .related-tools ul {
    grid-template-columns: 1fr 1fr; /* 2 columnas en tablets */
  }
}

@media (max-width: 480px) {
  .related-tools ul {
    grid-template-columns: 1fr; /* 1 columna en móviles */
  }
}
/* =========================
   6. RESPONSIVE
   ========================= */
@media (max-width: 768px) {
    .how-to-use {
        flex-direction: column;
        top: 0; /* Quitamos el desfase en móvil */
        margin-top: 20px;
    }
    .how-to-text { max-width: 100%; align-items: center; }
    .how-to-text ol li { text-align: left; }
    .how-to-box { padding: 30px; min-height: auto; }
    
    :is(.faq-container, .how-to-use, .example, .seo-content, .why-echo) :is(h1, h2, h3) {
        font-size: 1.6rem;
    }
}

/* FAQ Compact Grid 3x2 - kovertiz Dark */
.faq-compact.dark-theme {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  color: #ffffff;
  text-align: center;
}

.faq-header {
  margin-bottom: 3.5rem;
}

.ed-kicker {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #6366f1;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.ed-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
  line-height: 1.1;
}

.brand-accent { color: #6366f1; }

.ed-subtitle {
  font-size: 1.05rem;
  color: #a1a1aa;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Grid de 3 columnas para simetría */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2rem;
  text-align: left;
}

.faq-node {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 10px;
  border-radius: 4px;
  width: fit-content;
}

.faq-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.4rem 0 0.6rem 0;
  color: #ffffff;
  line-height: 1.3;
}

.faq-body p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d4d4d8;
  margin: 0;
}

.faq-body strong {
  color: #ffffff;
}

/* Responsive: 2 columnas en tablets, 1 en móvil */
@media (max-width: 1024px) {
  .faq-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .faq-meta { margin: 0 auto; }
}