/* ============================================================
   Tutoriales - Mu Naj Parrow
   Módulo aislado del CSS global.
   Reemplazo completo para public_html/assets/css/tutoriales.css
   ============================================================ */

/* Contenedor principal.
   Compatible con ambas estructuras:
   - <section class="tutorial-shell panel">
   - <div class="tutorial-layout">
*/
.tutorial-shell.panel,
.tutorial-layout {
  width: min(1180px, 92vw);
  max-width: 1180px;
  margin: 28px auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  overflow: visible;
}

/* Evita que el selector global main{width...} rompa el contenido
   si tutoriales.php todavía usa <main class="tutorial-content"> */
main.tutorial-content,
.tutorial-shell main.tutorial-content,
.tutorial-layout main.tutorial-content {
  width: auto;
  margin: 0;
}

/* Sidebar */
.tutorial-sidebar {
  position: sticky;
  top: 82px;
  align-self: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(18,8,8,.88), rgba(7,4,5,.82));
  box-shadow: var(--shadow);
}

.tutorial-sidebar .eyebrow {
  margin: 0 0 10px;
}

.tutorial-sidebar h1,
.tutorial-shell.panel .tutorial-sidebar h1,
.tutorial-layout .tutorial-sidebar h1,
.panel .tutorial-sidebar h1 {
  font-size: 32px !important;
  line-height: 1 !important;
  margin: 8px 0 12px !important;
  letter-spacing: -.03em !important;
  text-transform: uppercase;
  color: #fff4e5;
  max-width: 100%;
}

.tutorial-sidebar .muted {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 18px;
}

/* Menú lateral */
.tutorial-menu {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.tutorial-menu a {
  display: block;
  border: 1px solid rgba(255,226,160,.14);
  border-radius: 14px;
  padding: 13px 14px;
  background: linear-gradient(180deg, rgba(30,16,16,.72), rgba(8,5,6,.70));
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.tutorial-menu a:hover,
.tutorial-menu a.active {
  transform: translateY(-1px);
  border-color: rgba(240,184,92,.48);
  background: linear-gradient(90deg, rgba(181,22,34,.28), rgba(0,0,0,.18));
}

/* Soporta menú con <span> título + <small> bajada */
.tutorial-menu a > span {
  display: block;
  color: var(--gold2);
  font-family: var(--font-title);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 14px;
}

.tutorial-menu a > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
}

/* Soporta menú alternativo con <strong> título + <span> bajada */
.tutorial-menu a > strong {
  display: block;
  color: var(--gold2);
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-menu a > strong + span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

/* Contenido */
.tutorial-content {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(12,7,9,.82), rgba(7,4,6,.72));
  box-shadow: var(--shadow);
}

.tutorial-head {
  margin: 0 0 18px;
}

.tutorial-head .eyebrow {
  margin: 0 0 8px;
}

.tutorial-head h1,
.tutorial-head h2,
.tutorial-content > h1,
.tutorial-content > h2,
.tutorial-shell.panel .tutorial-content h1,
.tutorial-shell.panel .tutorial-content h2,
.tutorial-layout .tutorial-content h1,
.tutorial-layout .tutorial-content h2,
.panel .tutorial-content h1,
.panel .tutorial-content h2 {
  font-size: clamp(28px, 3.2vw, 46px) !important;
  line-height: 1.02 !important;
  margin: 8px 0 16px !important;
  letter-spacing: -.035em !important;
  text-transform: uppercase;
  color: var(--gold2);
}

.tutorial-head .muted {
  max-width: 900px;
  line-height: 1.5;
}

.tutorial-content h3,
.tutorial-layout .tutorial-content h3,
.tutorial-shell.panel .tutorial-content h3 {
  font-size: 21px;
  line-height: 1.12;
  margin: 14px 0 10px;
  color: var(--gold2);
  text-transform: uppercase;
}

.tutorial-content p,
.tutorial-content li {
  color: var(--muted);
  line-height: 1.58;
}

.tutorial-note,
.tutorial-warning {
  border: 1px solid rgba(240,184,92,.22);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 16px 0 20px;
  background: rgba(0,0,0,.28);
  color: var(--muted);
  line-height: 1.55;
}

.tutorial-warning {
  border-color: rgba(255,48,64,.35);
  background: rgba(181,22,34,.12);
}

/* Grillas y cards */
.tutorial-grid,
.tutorial-card-grid {
  display: grid;
  gap: 16px;
}

.tutorial-grid.two,
.tutorial-card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tutorial-card,
.tutorial-box {
  border: 1px solid rgba(255,226,160,.14);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(30,16,16,.78), rgba(8,5,6,.74));
  box-shadow: 0 14px 32px rgba(0,0,0,.22);
  min-width: 0;
}

.tutorial-card h3,
.tutorial-box h3 {
  margin-top: 0;
}

.tutorial-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.62;
}

.tutorial-list li {
  margin: 7px 0;
}

.tutorial-list strong {
  color: #fff2df;
}

/* Acordeones */
.tutorial-group {
  border: 1px solid rgba(255,226,160,.14);
  border-radius: 18px;
  margin: 14px 0;
  background: rgba(0,0,0,.22);
  overflow: hidden;
}

.tutorial-group > summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 18px;
  color: var(--gold2);
  font-family: var(--font-title);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: linear-gradient(90deg, rgba(181,22,34,.20), rgba(0,0,0,.10));
  border-bottom: 1px solid transparent;
}

.tutorial-group > summary::-webkit-details-marker {
  display: none;
}

.tutorial-group > summary::after {
  content: " +";
  float: right;
  color: var(--gold);
}

.tutorial-group[open] > summary {
  border-bottom-color: rgba(240,184,92,.22);
}

.tutorial-group[open] > summary::after {
  content: " -";
}

.tutorial-group > .tutorial-grid,
.tutorial-group > .tutorial-card,
.tutorial-group > .tutorial-note,
.tutorial-group > .tutorial-warning {
  margin: 18px;
}

/* Tablas */
.tutorial-table {
  width: 100%;
  border-collapse: collapse;
}

.tutorial-table td {
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,226,160,.10);
  color: var(--muted);
  line-height: 1.45;
}

.tutorial-table td:first-child {
  width: 210px;
  color: var(--gold2);
  font-weight: 900;
}

/* Pasos */
.tutorial-steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.tutorial-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(255,226,160,.12);
  border-radius: 14px;
  background: rgba(0,0,0,.22);
}

.tutorial-step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #180707;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  font-weight: 950;
}

/* Código */
.tutorial-content code,
.tutorial-shell code,
.tutorial-layout code {
  color: #ffe2a0;
  background: rgba(0,0,0,.30);
  border: 1px solid rgba(255,226,160,.12);
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}

/* Responsive */
@media(max-width: 1100px) {
  .tutorial-shell.panel,
  .tutorial-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }

  .tutorial-sidebar h1,
  .tutorial-shell.panel .tutorial-sidebar h1,
  .tutorial-layout .tutorial-sidebar h1,
  .panel .tutorial-sidebar h1 {
    font-size: 30px !important;
  }
}

@media(max-width: 980px) {
  .tutorial-shell.panel,
  .tutorial-layout {
    grid-template-columns: 1fr;
  }

  .tutorial-sidebar {
    position: static;
  }

  .tutorial-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tutorial-grid.two,
  .tutorial-card-grid.two {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 620px) {
  .tutorial-shell.panel,
  .tutorial-layout {
    width: min(100% - 28px, 1180px);
    margin: 18px auto;
  }

  .tutorial-content,
  .tutorial-sidebar {
    padding: 18px;
  }

  .tutorial-menu {
    grid-template-columns: 1fr;
  }

  .tutorial-sidebar h1,
  .tutorial-shell.panel .tutorial-sidebar h1,
  .tutorial-layout .tutorial-sidebar h1,
  .panel .tutorial-sidebar h1 {
    font-size: 28px !important;
  }

  .tutorial-head h1,
  .tutorial-head h2,
  .tutorial-content > h1,
  .tutorial-content > h2,
  .tutorial-shell.panel .tutorial-content h1,
  .tutorial-shell.panel .tutorial-content h2,
  .tutorial-layout .tutorial-content h1,
  .tutorial-layout .tutorial-content h2,
  .panel .tutorial-content h1,
  .panel .tutorial-content h2 {
    font-size: 30px !important;
  }

  .tutorial-card {
    padding: 16px;
  }

  .tutorial-table td,
  .tutorial-table td:first-child {
    display: block;
    width: auto;
    padding: 8px 0;
  }

  .tutorial-table tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,226,160,.10);
  }

  .tutorial-table td {
    border-bottom: 0;
  }
}
