/* ========================================
   TUH Steam — Tutorials System
   Platform cards + tutorial cards + video modal
   ======================================== */

/* ====== Platform Cards ====== */
.sg-plat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(110px,1fr));
  gap:10px;
  margin-bottom:20px;
}

.sg-plat-card{
  background:#fff;
  border:2px solid #e5e5e5;
  border-radius:10px;
  padding:14px 8px;
  text-align:center;
  cursor:pointer;
  transition:all .2s;
  position:relative;
  user-select:none;
}
.sg-plat-card:hover{
  border-color:#ccc;
  box-shadow:0 4px 12px rgba(0,0,0,.06);
  transform:translateY(-2px);
}
.sg-plat-card.active{
  border-color:#2563eb;
  box-shadow:0 0 0 1px #2563eb,0 4px 12px rgba(37,99,235,.1);
}

.sg-plat-icon{
  width:36px;height:36px;
  border-radius:8px;
  display:grid;place-items:center;
  margin:0 auto 8px;
}

.sg-plat-name{font-size:11px;font-weight:700;color:#1a1a1e;line-height:1.2}
.sg-plat-count{font-size:9px;color:#888;margin-top:3px}

.sg-plat-arrow{
  display:none;
  position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);
  width:0;height:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-top:8px solid #2563eb;
}
.sg-plat-card.active .sg-plat-arrow{display:block}

/* ====== Tutorial Sections ====== */
.sg-tut-section{display:none}
.sg-tut-section.active{display:block}

/* ====== Section Label ====== */
.sg-tut-label{
  display:flex;align-items:center;gap:8px;
  margin-bottom:14px;font-size:12px;font-weight:700;color:#666;
}
.sg-tut-label::after{content:'';flex:1;height:1px;background:#ddd}

/* ====== Tutorial Cards Grid ====== */
.sg-tut-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

/* ====== Tutorial Card ====== */
.sg-tut-card{
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:10px;
  overflow:hidden;
  cursor:pointer;
  transition:all .2s;
}
.sg-tut-card:hover{
  box-shadow:0 4px 16px rgba(0,0,0,.08);
  border-color:#ccc;
  transform:translateY(-2px);
}

/* Cover */
.sg-tut-cover{
  height:100px;
  display:flex;align-items:center;justify-content:center;
  position:relative;overflow:hidden;
}
.sg-tut-cover--short{height:55px}

/* Platform gradient covers */
.sg-tut-cover--steam{background:linear-gradient(145deg,#1b2838,#2a475e)}
.sg-tut-cover--rockstar{background:linear-gradient(145deg,#1a1a1a,#333)}
.sg-tut-cover--ea{background:linear-gradient(145deg,#8b0000,#cc2222)}
.sg-tut-cover--ubisoft{background:linear-gradient(145deg,#003087,#0055cc)}
.sg-tut-cover--microsoft{background:linear-gradient(145deg,#2d7d2d,#4caf50)}
.sg-tut-cover--help{background:linear-gradient(145deg,#c2410c,#ea580c)}

/* Play button */
.sg-tut-play{
  width:40px;height:40px;
  background:rgba(0,0,0,.4);
  border:2px solid rgba(255,255,255,.25);
  border-radius:50%;
  display:grid;place-items:center;
  transition:all .2s;
}
.sg-tut-card:hover .sg-tut-play{
  background:rgba(255,255,255,.2);
  border-color:rgba(255,255,255,.5);
  transform:scale(1.1);
}
.sg-tut-play svg{margin-left:2px}

/* Link icon */
.sg-tut-link-icon{
  width:40px;height:40px;
  background:rgba(255,255,255,.1);
  border:2px solid rgba(255,255,255,.2);
  border-radius:10px;
  display:grid;place-items:center;
  transition:all .2s;
}
.sg-tut-card:hover .sg-tut-link-icon{
  background:rgba(255,255,255,.2);
  border-color:rgba(255,255,255,.4);
}

/* Card body */
.sg-tut-body{padding:12px 14px}
.sg-tut-name{font-size:13px;font-weight:700;color:#1a1a1e;margin-bottom:3px}
.sg-tut-desc{font-size:11px;color:#666;line-height:1.4;margin-bottom:8px}
.sg-tut-meta{display:flex;align-items:center;gap:5px;font-size:10px;color:#888}

/* Tags */
.sg-tut-tag{
  margin-left:auto;
  padding:2px 8px;border-radius:4px;
  font-size:9px;font-weight:700;
  text-transform:uppercase;letter-spacing:.5px;
}
.sg-tut-tag--video{background:#eff6ff;color:#2563eb}
.sg-tut-tag--link{background:#fef3c7;color:#b45309}
.sg-tut-tag--guide{background:#ecfdf5;color:#059669}

/* ====== Video Modal ====== */
.sg-video-modal{
  display:none;
  position:fixed;inset:0;
  z-index:100000;
  align-items:center;justify-content:center;
}
.sg-video-modal.open{display:flex}

.sg-video-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.8);
  cursor:pointer;
}

.sg-video-wrap{position:relative;z-index:1}

.sg-video-close{
  color:#fff;font-size:13px;
  cursor:pointer;
  display:flex;align-items:center;gap:4px;
  justify-content:flex-end;
  margin-bottom:8px;
  opacity:.7;transition:opacity .2s;
  user-select:none;
}
.sg-video-close:hover{opacity:1}

.sg-video-box{
  width:90vw;max-width:800px;
  aspect-ratio:16/9;
  border-radius:12px;overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.sg-video-box iframe{width:100%;height:100%;border:none}

/* ====== Buscador spacing inside tutorials ====== */
.sg-tut-section .sg-wrapper{margin-bottom:16px}

/* ====== Responsive ====== */
@media(max-width:640px){
  .sg-plat-grid{grid-template-columns:repeat(3,1fr)}
  .sg-tut-grid{grid-template-columns:1fr}
}
@media(max-width:400px){
  .sg-plat-grid{grid-template-columns:repeat(2,1fr)}
}
