:root{
  --brand:#003761;
  --brand2:#005578;
  --bg:#f8fafc;
  --panel:#ffffff;
  --border:#e2e8f0;
  --ink:#0f172a;
  --muted:#64748b;
}

/* RESET */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Segoe UI',system-ui,Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
}
.logo-sw{height:28px}
.logo-app{height:28px}
/* ================= HEADER ================= */
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:linear-gradient(90deg,var(--brand),var(--brand2));
  color:#fff;
}

.site-header .wrap{
  max-width:1200px;
  margin:0 auto;
  padding:.6rem 1rem;

  display:flex;
  align-items:center;
  gap:1rem;

  flex-wrap:nowrap;              /* 🔑 masaüstünde ALTA DÜŞMEZ */
}

/* BRAND */
.brand{
  display:flex;
  align-items:center;
  gap:.6rem;
  white-space:nowrap;
}
.logo-sw{
  height:28px;
  display:block;
}

/* SEARCH */
.searchbar{
  position:relative;

  flex:1 1 360px;                /* büyür + küçülür */
  min-width:0;                   /* 🔑 shrink için şart */
  max-width:520px;

  margin-left:auto;              /* sağa iter */
}
.searchbar input{
  width:100%;
  padding:.55rem .75rem;
  border-radius:.6rem;
  border:none;
  font-size:.95rem;
}

/* SEARCH RESULTS (ileride lazım) */
.search-results{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  background:#fff;
  border:1px solid var(--border);
  border-radius:.6rem;
  box-shadow:0 6px 20px rgba(0,0,0,.08);
  display:none;
  z-index:50;
}

/* LANG */
.lang{
  display:flex;
  gap:.35rem;
  flex:0 0 auto;
}
.btn-lang{
  border:1px solid rgba(255,255,255,.5);
  background:rgba(255,255,255,.15);
  color:#fff;
  border-radius:.45rem;
  padding:.25rem .5rem;
  cursor:pointer;
  font:inherit;
}
.btn-lang.active{
  background:#fff;
  color:#003761;
  font-weight:700;
}

/* ACTIONS */
.actions{
  display:flex;
  gap:.4rem;
  flex:0 0 auto;
}
.btn{
  border:1px solid rgba(255,255,255,.5);
  background:transparent;
  color:#fff;
  border-radius:.5rem;
  padding:.45rem .7rem;
  cursor:pointer;
  font:inherit;
}

/* ================= LAYOUT ================= */
.main{
  max-width:1200px;
  margin:1rem auto;
  padding:0 1rem;

  display:grid;
  grid-template-columns:280px 1fr;
  gap:1rem;
}

.sidebar{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  padding:1rem;

  position:sticky;
  top:90px;
}

.tree{
  display:flex;
  flex-direction:column;
  gap:.5rem;
}

.tree-link,
.group button{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:.5rem;
  padding:.4rem .6rem;
  cursor:pointer;
  font:inherit;
}

details{
  border:1px solid var(--border);
  border-radius:.6rem;
  background:#fff;
}
summary{
  padding:.5rem .6rem;
  font-weight:600;
  cursor:pointer;
}
.group{
  padding:.3rem;
  display:flex;
  flex-direction:column;
  gap:.25rem;
}

/* ================= CONTENT ================= */
.content{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  padding:1rem 1.25rem;
}

.card{background:none}
.hidden{display:none}

.page-head{margin-bottom:.8rem}
.kicker{color:var(--muted)}

.wf-card,
.cmd-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:.75rem;
  padding:1rem;
  margin-top:.8rem;
}

/* ================= VIDEOS ================= */
.video-list{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}
.video-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:.75rem;
  padding:.85rem;
}
.video-title{
  font-weight:700;
  margin-bottom:.55rem;
}

/* responsive youtube */
.video-embed{
  position:relative;
  width:100%;
  padding-top:56.25%;
  border-radius:.75rem;
  overflow:hidden;
  background:#000;
}
.video-embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* FOOTER */
.footer{
  text-align:center;
  margin:2rem;
  color:var(--muted);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px){
  .site-header .wrap{
    flex-wrap:wrap;             /* mobilde satır kırılabilir */
  }

  .searchbar{
    flex-basis:100%;
    max-width:none;
    margin-left:0;
  }

  .actions{
    width:100%;
    justify-content:flex-end;
  }

  .main{
    grid-template-columns:1fr;
  }

  .sidebar{
    position:static;
  }
}
