
:root{
  --bg:#f7f9fc;
  --surface:#ffffff;
  --surface-2:#f3f6ff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --primary:#2563eb;
  --primary-hover:#1d4ed8;
  --danger:#dc2626;
  --danger-hover:#b91c1c;

  --radius:16px;
  --radius-sm:12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, .06);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% 0%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(900px 400px at 90% 10%, rgba(99,102,241,.10), transparent 60%),
    var(--bg);
  color:var(--text);
  line-height:1.45;
}

a{color:inherit}

.container{width:min(1120px, 92%); margin:0 auto}

.header{
  position:sticky; top:0; z-index:10;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--border);
}
.header__row{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
  padding:14px 0;
}

.logo{
  display:flex; align-items:center; gap:10px;
  text-decoration:none;
}
.logo__mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:12px;
  background:var(--surface-2);
  border:1px solid var(--border);
  font-weight:800;
  letter-spacing:.5px;
}
.logo__text{font-weight:800}

.nav{display:flex; flex-wrap:wrap; align-items:center; gap:8px}
.nav__spacer{flex:1 1 auto}

.nav__link{
  text-decoration:none;
  padding:8px 10px;
  border-radius:999px;
  color:var(--muted);
  border:1px solid transparent;
}
.nav__link:hover{background:rgba(37,99,235,.08); color:var(--text)}
.nav__link.is-active{
  background:rgba(37,99,235,.10);
  border-color:rgba(37,99,235,.18);
  color:var(--text);
}

.main{min-height:calc(100vh - 132px); padding:26px 0}

.footer{
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(140%) blur(8px);
  border-top:1px solid var(--border);
  padding:18px 0;
    text-align: center;
}
.footer__row{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-align:center;
}

.footer__left{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.footer__title{font-weight:700;}
.footer__muted{color:var(--muted); font-size:14px; margin-top:3px}

.page-title{margin:0 0 10px 0; font-size:28px; letter-spacing:-0.2px}
.page-head{margin-bottom:14px}
.page-subtitle{margin-top:2px}
.muted{color:var(--muted)}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.card--hover:hover{box-shadow:var(--shadow); transform:translateY(-1px)}
.card__img{
  width:100%;
  aspect-ratio: 16/9;
  object-fit:cover;
  background:#eef2ff;
}
.card__body{padding:14px}
.card__title{margin:0 0 6px 0; font-size:18px}
.card__text{margin:0; color:var(--muted)}
.card__actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px}

.prewrap{white-space:pre-wrap}
.meta{margin-top:8px}

.grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:16px}
@media (max-width: 980px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 640px){
  .grid{grid-template-columns:1fr}
  .page-title{font-size:24px}
}

.alert{
  padding:12px 14px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:rgba(255,255,255,.85);
  box-shadow:var(--shadow-sm);
  margin:12px 0;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  font-size:14px;
  line-height:1;
}
.btn:hover{border-color:#cbd5e1}
.btn:active{transform:translateY(1px)}

.btn--primary{background:var(--primary); color:#fff; border-color:var(--primary)}
.btn--primary:hover{background:var(--primary-hover); border-color:var(--primary-hover)}

.btn--danger{background:var(--danger); color:#fff; border-color:var(--danger)}
.btn--danger:hover{background:var(--danger-hover); border-color:var(--danger-hover)}

.btn--ghost{background:transparent}

.form{
  background:rgba(255,255,255,.88);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow-sm);
}

.row{display:flex; gap:12px; flex-wrap:wrap}
.row > *{flex:1 1 260px}

.field{display:flex; flex-direction:column; gap:6px; margin-bottom:12px}
.field label{font-weight:650}

.field input,
.field textarea,
.field select{
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  font:inherit;
  background:var(--surface);
  outline:none;
}
.field textarea{min-height:110px; resize:vertical}

.field input:focus,
.field textarea:focus,
.field select:focus{
  border-color:rgba(37,99,235,.55);
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.field--actions{align-self:flex-end; display:flex; flex-direction:row; gap:8px; align-items:center; justify-content:flex-end}

.file-hint{font-size:13px; color:var(--muted)}

.stack{display:flex; flex-direction:column; gap:12px}
.spacer{height:14px}
.spacer-top{margin-top:10px}

.kv{display:grid; grid-template-columns: 180px 1fr; gap:10px; margin:12px 0}
.kv div{padding:10px 12px; background:rgba(255,255,255,.88); border:1px solid var(--border); border-radius:var(--radius)}
.kv .k{color:var(--muted)}

.faculty-card__img,
.card__img,
.faculty__img {
  width: 100%;
  height: 250px;    
  object-fit: cover; 
  border-radius: 12px;
  display: block;
}
/* ---- Форма поиска факультетов: дополнительные фильтры и сортировка ---- */
.row--search > .field--wide{
  flex: 2 1 420px;
}
.row--search > .field--compact{
  flex: 1 1 220px;
  max-width: 320px;
}
.row--search > .field--actions{
  flex: 0 0 auto;
}

/* Текст ошибок под формой/полем (без alert/всплывашек) */
.form-error{
  margin: 8px 0 0;
  color: var(--danger);
  font-weight: 650;
}
