/* ===========================================
   БАЗА ТАЛАНТЛИВЫХ ДЕТЕЙ
   Сладковский муниципальный округ
   v2.3 - Герб точно видимый
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --green: #1a5632;
  --green-light: #2d7a4a;
  --gold: #c8932a;
  --gold-light: #e0b04a;
  --gold-dark: #a0751e;
  --bg: #f5f3ed;
  --white: #ffffff;
  --text: #2d2d2d;
  --text-soft: #5a5a5a;
  --border: #e0dcd0;
  --radius: 16px;
  --shadow: 0 4px 12px rgba(26,86,50,0.06);
  --shadow-hover: 0 16px 28px -8px rgba(26,86,50,0.14);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  color: var(--gold-dark);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--green);
  line-height: 1.3;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }

p {
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============ ОСНОВНОЙ БЛОК ============ */
main#main-collapse {
  background: var(--bg);
  padding: 30px 20px 50px;
  min-height: 100vh;
  width: 100%;
}

@media (min-width: 768px) {
  main#main-collapse {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 35px 30px 60px;
  }
}

/* ============ ЗАГОЛОВОК СТРАНИЦЫ ============ */
.section-container-spacer {
  text-align: center;
  margin-bottom: 40px;
  width: 100%;
}

.section-container-spacer h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--green);
  margin-bottom: 12px;
  padding: 0 10px;
}

.section-container-spacer h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--gold-dark);
  background: rgba(200,147,42,0.1);
  display: inline-block;
  padding: 8px 24px;
  border-radius: 100px;
  border: 1px solid rgba(200,147,42,0.2);
}

.section-container-spacer::after {
  content: '';
  display: block;
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  margin: 20px auto 0;
  border-radius: 2px;
}

/* ============ СЕТКА КАРТОЧЕК ============ */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.row::before,
.row::after {
  display: none;
}

/* ============ КАРТОЧКА ============ */
.col-xs-8,
.col-md-3,
.col-xs-8.col-md-3 {
  width: 350px;
  max-width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  float: none;
  padding: 0;
  margin: 0;
  min-height: auto;
  max-height: none;
  position: relative;
}

.col-xs-8.col-md-3:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(200,147,42,0.35);
}

/* ============ КАРТИНКА В КАРТОЧКЕ ============ */
.col-xs-8.col-md-3 > img,
.col-xs-8.col-md-3 > .img-responsive {
  width: 100%;
  height: 250px;
  object-fit: contain;
  object-position: center center;
  background: #ffffff;
  display: block;
  transition: transform 0.4s ease;
  margin: 0;
  padding: 0;
}

.col-xs-8.col-md-3:hover > img,
.col-xs-8.col-md-3:hover > .img-responsive {
  transform: scale(1.03);
}

/* ============ ЗАГОЛОВОК КАРТОЧКИ ============ */
.col-xs-8.col-md-3 h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green);
  padding: 18px 20px 0;
  margin: 0;
}

.col-xs-8.col-md-3 h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--gold);
  margin-top: 8px;
  border-radius: 1px;
}

/* ============ ТЕКСТ КАРТОЧКИ ============ */
.col-xs-8.col-md-3 p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
  padding: 10px 20px 20px;
  margin: 0;
  flex-grow: 1;
}

/* ============================================
   САЙДБАР
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: -250px;
  width: 240px;
  height: 100vh;
  background: #fff;
  z-index: 1000;
  padding: 30px 20px 25px;
  overflow-y: auto;
  transition: left 0.3s ease;
  border-right: 1px solid #eee;
}

.sidebar.open {
  left: 0;
}

@media (min-width: 768px) {
  .sidebar {
    left: 0;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
  }
}

/* ============================================
   ГЕРБ В САЙДБАРЕ - 200px
   ============================================ */
.site-header {
  text-align: center;
  margin-bottom: 25px;
  display: block !important;
}

.site-brand {
  display: block !important;
  text-align: center;
  line-height: 1.2;
}

/* ГЕРБ - 200px */
.site-logo {
  display: block !important;
  width: 200px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
  transition: transform 0.3s ease;
  visibility: visible !important;
  opacity: 1 !important;
}

.site-logo:hover {
  transform: scale(1.05);
}

/* ============================================
   МОБИЛЬНЫЙ ХЕДЕР - ГЕРБ 50px
   ============================================ */
.navbar-brand::before {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  min-width: 50px;
  background: url('/assets/images/2026/gerb.png') center/contain no-repeat;
}

/* Адаптив */
@media (max-width: 767px) {
  .site-logo {
    width: 150px;
  }
}

@media (min-width: 768px) {
  .site-logo {
    width: 200px;
  }
}

/* Навигация */
.nav {
  list-style: none;
  padding: 0;
  margin-top: 5px;
}

.nav > li {
  margin-bottom: 2px;
}

.nav > li > a {
  display: block;
  padding: 9px 12px;
  font-size: 0.9rem;
  color: #444;
  border-radius: 8px;
  transition: 0.2s;
}

.nav > li > a:hover {
  background: rgba(26,86,50,0.06);
  color: var(--green);
}

.nav > li > a.active {
  background: rgba(26,86,50,0.1);
  color: var(--green);
  font-weight: 600;
  border-left: 3px solid var(--gold);
}

/* ============================================
   МОБИЛЬНЫЙ ХЕДЕР
   ============================================ */
.navbar-default {
  background: #fff;
  border-bottom: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  margin: 0;
}

.navbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--green) !important;
  line-height: 1.3;
  flex: 1;
  padding: 0 10px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: normal;
  height: auto;
}

.navbar-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: 2px solid var(--green);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.navbar-toggle .icon-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
}

.navbar-toggle .sr-only {
  display: none;
}

/* ============ АДАПТИВ ============ */
@media (max-width: 767px) {
  main#main-collapse {
    padding: 20px 12px 40px;
    margin-left: 0;
    width: 100%;
  }
  
  .row {
    gap: 16px;
  }
  
  .col-xs-8.col-md-3 {
    width: 100%;
  }
  
  .col-xs-8.col-md-3 > img,
  .col-xs-8.col-md-3 > .img-responsive {
    height: 220px;
  }
  
  .section-container-spacer h1 {
    font-size: 1.35rem;
  }
  
  .section-container-spacer h3 {
    font-size: 0.85rem;
    padding: 6px 16px;
  }

  .site-logo {
    width: 100px;
  }
}

@media (min-width: 768px) {
  .navbar-default.visible-xs {
    display: none !important;
  }
  
  .site-logo {
    width: 140px;
  }
}

@media (min-width: 992px) {
  .col-xs-8.col-md-3 {
    width: 340px;
  }
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

@media print {
  .sidebar, .navbar-default { display: none; }
  main#main-collapse { margin: 0; width: 100%; padding: 0; }
  .col-xs-8.col-md-3 { box-shadow: none; border: 1px solid #ccc; }
}
.btn-more {
    display: block;
    width: 220px;
    margin-top: 60px ! important;     /* только отступ сверху */
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 14px 28px;
    background-color: #a0751e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-more:hover {
    background-color: #2d7a4a;
}