/* ============================================================
   «Опора» — светлый современный дизайн (кастомный слой)
   Подключается поверх стандартного style.css / responsive.css
   ============================================================ */

:root{
  --op-bg:#f3f6fb;
  --op-card:#ffffff;
  --op-ink:#1b2b4a;
  --op-text:#52637a;
  --op-muted:#8b98aa;
  --op-line:#e5eaf2;
  --op-blue:#2d6ef5;
  --op-blue-2:#1a5ce0;
  --op-blue-soft:#eaf2ff;
  --op-shadow:0 2px 8px rgba(27,43,74,.06);
  --op-shadow-lg:0 14px 40px rgba(27,43,74,.10);
  --op-grad:linear-gradient(135deg,#4a94ff 0%,#2d6ef5 100%);
}

html, body { height: 100%; }

/* ---------- База и прижатый к низу подвал ---------- */
body{
  background: var(--op-bg);
  color: var(--op-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  float: none;
}
body > header { flex: 0 0 auto; }
body > section.home-search { flex: 0 0 auto; }
body > section:not(.home-search) { flex: 1 0 auto; padding-bottom: 30px; }
body > footer { flex: 0 0 auto; }

h1, h2 { font-family: 'Merriweather', serif; color: var(--op-ink); font-weight: 700; }
h3, h4, h5 { color: var(--op-ink); }

a { color: var(--op-text); }
a:hover { color: var(--op-blue); }

/* ---------- Шапка ---------- */
header{
  background: #fff;
  box-shadow: 0 1px 0 var(--op-line), 0 10px 30px rgba(27,43,74,.05);
}
header #logo a { color: var(--op-ink); font-weight: 700; }
header .nav a { color: var(--op-ink); font-weight: 600; transition: .2s; }
header .nav a:hover { color: var(--op-blue); border-color: var(--op-blue); }

header .nav a.publish{
  background: var(--op-grad);
  border: 0;
  color: #fff;
  border-radius: 100px;
  box-shadow: 0 6px 16px rgba(45,111,245,.28);
}
header .nav a.publish:hover{
  background: linear-gradient(135deg,#2d6ef5 0%,#1a5ce0 100%);
  box-shadow: 0 8px 20px rgba(45,111,245,.34);
  border: 0;
}

/* ---------- Hero-блок поиска ---------- */
body.home header { background: #fff; }
body.home section.header-ad { background: transparent; }
body.home section.home-search{
  background: linear-gradient(180deg,#e7f0ff 0%,#f4f8ff 55%,#f3f6fb 100%);
  padding: 26px 0 46px;
}
body.home section.home-search h1{
  text-align: center;
  margin: 26px 0 24px;
  font-size: 30px;
  line-height: 38px;
}
body.home section.home-search form.search{
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--op-shadow-lg);
  padding: 26px 26px 14px;
  margin: 0;
}

.main-search { display: flex; gap: 14px; margin: 0; float: none; }
.main-search > .cell { flex: 1 1 0; width: auto; padding: 0; float: none; }
.main-search > .cell.c1 { flex: 1.6; }
.main-search > .cell label{
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--op-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 6px 2px;
}
.main-search input[type="text"],
.main-search select{
  width: 100%;
  height: 50px;
  border: 1px solid var(--op-line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--op-text);
  font-size: 15px;
  padding: 0 14px;
  box-sizing: border-box;
}
.main-search input[type="text"]:focus,
.main-search select:focus{
  border-color: var(--op-blue);
  box-shadow: 0 0 0 3px rgba(45,111,245,.12);
  outline: none;
  background: #fff;
}
.btn.btn-primary{
  background: var(--op-grad);
  border: 0;
  border-radius: 10px;
  height: 50px;
  box-shadow: 0 6px 16px rgba(45,111,245,.28);
  font-weight: 700;
}
.btn.btn-primary:hover{
  background: linear-gradient(135deg,#2d6ef5 0%,#1a5ce0 100%);
}
@media (min-width: 981px){
  .main-search > .cell.c3 { flex: 0 0 190px; }
}

/* ---------- Блок категорий ---------- */
#home-cats{
  background: transparent;
  padding: 30px 0 12px;
}
#home-cats h2{
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 28px;
}
#home-cats .wrap{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
#home-cats a{
  width: auto;
  height: auto;
  min-height: 126px;
  margin: 0;
  padding: 20px 10px 16px;
  background: #fff;
  border: 1px solid var(--op-line);
  border-radius: 14px;
  box-shadow: var(--op-shadow);
  text-align: center;
  transition: .22s;
}
#home-cats a:hover{
  transform: translateY(-4px);
  border-color: #c9dbfb;
  box-shadow: 0 14px 30px rgba(45,111,245,.14);
  text-decoration: none;
}
#home-cats a .icon { margin: 0 0 12px; display: block; width: 100%; }
#home-cats a .icon i { font-size: 32px; line-height: 36px; }
#home-cats a strong{
  display: block;
  color: var(--op-ink);
  font-size: 13px;
  line-height: 18px;
  max-height: 54px;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* ---------- Блок локаций ---------- */
#home-regs{
  background: #fff;
  border: 1px solid var(--op-line);
  border-radius: 14px;
  box-shadow: var(--op-shadow);
  padding: 20px 18px;
}
#home-regs h2{
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 14px;
}
#home-regs .wrap > div { margin: 0 0 8px; }
#home-regs a{ color: var(--op-text); font-size: 14px; transition: .15s; }
#home-regs a:hover{ color: var(--op-blue); text-decoration: none; }
#home-regs a i{ color: var(--op-blue); }

/* ---------- Подвал ---------- */
footer{
  background: #fff;
  border-top: 1px solid var(--op-line);
  margin-top: 24px;
}
footer .box > a{ color: var(--op-ink); }
footer .box > a:hover{ color: var(--op-blue); }
footer .copy, footer .language, footer .bottom{ color: var(--op-muted); }
footer .copy a{ color: var(--op-muted); }

/* ---------- Карточки объявлений (внутренние страницы) ---------- */
.listing-grid .listing-card{
  border-color: var(--op-line);
  box-shadow: var(--op-shadow);
  border-radius: 12px;
  transition: .2s;
}
.listing-grid .listing-card:hover{
  border-color: #c9dbfb;
  box-shadow: 0 12px 26px rgba(45,111,245,.12);
}
.listing-card{ border-bottom: 1px solid var(--op-line); }

/* ---------- Светлые панели форм ---------- */
#sidebar .filters,
body.login > section,
body.register > section,
body.recover > section,
body.contact > section,
body.report > section,
body.item-post > section{
  background: #fafbfe;
}

/* ---------- Мобильные категории: 2 колонки ---------- */
@media (max-width: 767px){
  #home-cats .wrap{ grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Главная: две кнопки (Вакансии / Резюме) ---------- */
body.home #main { width: 100%; }
#home-actions{
  display: flex;
  gap: 18px;
  width: 100%;
  margin: 0 0 10px;
}
#home-actions .action-card{
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
#home-actions .action-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
  text-decoration: none;
  color: #fff;
}
#home-actions .action-vak{ background: linear-gradient(135deg,#2563eb,#1d4ed8); }
#home-actions .action-rez{ background: linear-gradient(135deg,#16a34a,#15803d); }
#home-actions .action-icon i{ font-size: 32px; line-height: 38px; }
#home-actions .action-txt strong{
  display: block;
  font-size: 19px;
  line-height: 24px;
  margin-bottom: 3px;
  font-family: 'Nunito', Arial, sans-serif;
}
#home-actions .action-txt span{ display: block; font-size: 13px; line-height: 18px; opacity: .92; }

.home-cats-rez{ padding-top: 6px !important; }
.home-cats-rez h2{ border-top: 1px solid var(--op-line); padding-top: 24px; }

/* ---------- Главная: блок городов на всю ширину ---------- */
#home-regs{
  float: left;
  clear: both;
  width: 100%;
  margin: 0 0 20px;
  box-sizing: border-box;
}
#home-regs .wrap{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 18px;
}
#home-regs .wrap > div{ margin: 0; }
#home-regs .wrap > div:nth-of-type(1n+10){ display: block; }

@media (max-width: 900px){
  #home-regs .wrap{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  #home-actions{ flex-direction: column; }
}
