:root {
  --primary-color: #003366;      /* основной синий цвет */
  --background-light: #f5f5f5;   /* светлый фон */
  --white: #ffffff;               /* белый цвет */
  --text-dark: #1a1a1a;           /* основной текст */
  --border-light: #dddddd;        /* для границ, точек, пагинации */
}

/* ===== Базовые стили ===== */
body, 
header, nav, main, footer, section, div, p, h1, h2, h3, h4, h5, h6, a, li, span {
    font-family: "Times New Roman", Times, serif;
    color: var(--text-dark);
}

/* ===== Вес шрифта и размеры ===== */
body {
    background-image: url('/img/2.png');
    background-repeat: repeat;
    background-position: top center;
    background-size: 100%;
    font-weight: 400;        
    font-size: 20px;         
    line-height: 1.5;        
}

h1, h2, h3, .media-title, .block h2 {
    font-weight: 600;        
}

a, .nav a {
    font-weight: 500;        
}

/* ===== Центрирование текста во всех блоках ===== */
.blocks .block,
.news-about,
.media-about,
.media-item,
.media-title,
.block h2 {
    text-align: center;
}
.main-content {
  /* background: url('/img/background.png') no-repeat center top;
  background-size: cover;              */
  min-height: 100%;             
  box-sizing: border-box;
}

/* Чтобы хедер и футер не накрывались */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header, footer {
  z-index: 10;
  position: relative;
}
/* ===== Адаптив для маленьких экранов ===== */
@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    h1, h2, h3, .media-title, .block h2 {
        font-size: 22px;
    }
}

html, body {
  margin: 0;
  padding: 0;
}

/* ===== Основной контент: две колонки ===== */
.flex-container {
  display: flex;
  gap: 24px;
  max-width: 1350px; 
  margin: 40px auto;
  padding: 0 20px;
  align-items: flex-start;
}

/* Левая колонка: два блока вертикально */
.left-column {
  flex: 2.6; 
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Блок Жаңалықтар */
.news-about {
  background-color: #ffffffe2; 
  padding: 15px;
  border-radius: 8px;
  box-shadow: 5px 5px 4px rgba(0,0,0,0.1);
}

.news-about .media-title {
  text-align: center;
  margin-bottom: 15px;
  font-size: 26px;
  color: var(--primary-color);
}

.news-about .media-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.news-about .media-item {
  background: var(--white);
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  overflow: hidden; 
  position: relative; 

}

/* БАҚ біз жайлы */
.media-about {
  background-color: #ffffffe2;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 5px 5px 4px rgba(0,0,0,0.1);
}

.media-about .media-title {
  text-align: center;
  margin-bottom: 15px;
  font-size: 26px;
  color: var(--primary-color);
}

.media-about .media-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.media-about .media-item {
  flex: 1 1 calc(33.333% - 20px);
  background: var(--white);
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  overflow: hidden; 
  position: relative; 

}

.media-item img {
  width: 100%;
  height: 250px; /* фиксированная высота картинки, можно подогнать под твой макет */
  object-fit: cover;
  display: block;
  transform-origin: center center;
  transition: transform 0.3s ease;
}

.media-item:hover img {
  transform: scale(1.1);
}
/* Правая колонка: один столбец */
.blocks {
  max-height: 80%;
  flex: 1.4;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.block {
  text-decoration: none;
  background-color: #ffffffe2;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 5px 5px 4px rgba(0,0,0,0.1);
}

/* Заголовки и карточки */
.blocks .block,
.news-about,
.media-about,
.media-item,
.media-title,
.block h2 {
  text-align: center;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 992px) {
  .flex-container {
    flex-direction: column; 
  }

  .left-column,
  .blocks {
    width: 100%;
  }

  .news-about .media-item,
  .media-about .media-item {
    flex: 1 1 50%;
  }
}

@media (max-width: 768px) {
  .news-about .media-item,
  .media-about .media-item {
    flex: 1 1 100%;
  }
  .media-about .media-blocks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .news-about .media-item,
  .media-about .media-item {
    padding: 10px;
  }

  .block {
    padding: 10px;
  }
}

@media (max-width: 320px) {
  .news-about .media-item,
  .media-about .media-item {
    padding: 8px;
  }

  .block {
    padding: 8px;
  }
}
@media (max-width: 768px) {
  .news-about .media-blocks {
    grid-template-columns: 1fr;
  }
}
/* ===== Slider на всю ширину ===== */

.slider {
  position: relative;
  width: 100%;
  height: 60vh;
  max-height: 900px;
  min-height: 300px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ЛЕВАЯ ПОЛОВИНА */
.slider::before,
.slider::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background-image: url('/img/bg_slaider.png');
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(0px);      /* меньше блюр */
  transform: scale(1.05);  /* чтобы края не резались */
  z-index: 0;
}

.slider::before {
  left: 0;
  background-position: left center;
}

.slider::after {
  right: 0;
  background-position: right center;
}
.bg_test{
  background: url('/img/bgkids.jpeg') center top no-repeat;
  background-size: cover;  
  position: center;
  width: 100vw;
  overflow: hidden;
  height: 60vh;
  max-height: 700px;
  min-height: 300px;
}
.slider-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;  
  top: 0;
  left: 100%;         
  width: 100%;
  height: 100%; 
  transition: all 0.6s ease;
}

.slide.active {
  left: 0;
}

.slide.prev {
  left: -100%;
}
.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Стрелки */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  color: var(--primary-color);
  cursor: pointer;
  user-select: none;
  z-index: 10;
  padding: 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
}

.slider-arrow.left { left: 20px; }
.slider-arrow.right { right: 20px; }

/* Пагинация кружочки */
.slider-dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
}

.slider-dots .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  background: var(--border-light);
  border-radius: 50%;
  cursor: pointer;
}

.slider-dots .dot.active {
  background: var(--primary-color);
}

/* ===== MEDIA QUERIES для слайдера ===== */
@media (max-width: 992px) {
  .slider { height: 50vh; max-height: 500px; }
}

@media (max-width: 768px) {
  .slider { height: 45vh; max-height: 400px; }
}

@media (max-width: 480px) {
  .slider { height: 35vh; max-height: 300px; }
}


/* ===== Иконки для блоков справа (.blocks) ===== */
.block-icon {
  text-decoration: none;
  width: 15%;       /* базовый размер увеличен */
  height: 15%;
  margin-right: 14px; /* чуть больше отступ */
  vertical-align: middle;
}

/* ===== MEDIA QUERIES для адаптива блоков ===== */

/* Планшеты горизонтальные (992px) */
@media (max-width: 992px) {
  .block-icon {
    width: 44px;
    height: 44px;
    margin-right: 12px;
  }
}

/* Планшеты вертикальные / большие телефоны (768px) */
@media (max-width: 768px) {
  .block-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }
}

/* Смартфоны (480px) */
@media (max-width: 480px) {
  .block-icon {
    width: 36px;
    height: 36px;
    margin-right: 8px;
  }
}

/* Мелкие экраны (320px) */
@media (max-width: 320px) {
  .block-icon {
    width: 32px;
    height: 32px;
    margin-right: 6px;
  }
}
/* ===== Увеличение картинок (lightbox) ===== */
.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.img-lightbox.active {
  display: flex;
}

.img-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* курсор-лупа на всех картинках контента */
.page-img,
.news-img,
img {
  cursor: zoom-in;
}
/* ===== Превью текста новости (главная) ===== */
.news-preview {
  position: relative;
  overflow: hidden;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5; /* ≈ до красной линии */

  line-height: 1.6;
  max-height: calc(1.6em * 5);
}

/* ... далее / ... ары қарай */
.news-more {
  font-weight: 600;
  color: var(--primary-color);
  white-space: nowrap;
}

@media (max-width: 992px) {
  .news-preview {
    -webkit-line-clamp: 5;
    max-height: calc(1.6em * 5);
  }
}

@media (max-width: 768px) {
  .news-preview {
    -webkit-line-clamp: 4;
    max-height: calc(1.6em * 4);
  }
}

@media (max-width: 480px) {
  .news-preview {
    -webkit-line-clamp: 3;
    max-height: calc(1.6em * 3);
    font-size: 16px;
  }
}

@media (max-width: 320px) {
  .news-preview {
    -webkit-line-clamp: 2;
    max-height: calc(1.6em * 2);
    font-size: 15px;
  }
}
/* ===== Кликабельный блок новости ===== */
.media-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.media-link:hover h3 {
  color: var(--primary-color);
}

.media-link:hover img {
  transform: scale(1.05);
}
/* ===================================== */
/* ===== АДАПТИВ КОНТЕЙНЕРА /news ===== */
/* ===================================== */

@media (max-width: 992px) {
  .news-page {
    margin: 20px auto;
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .news-page {
    margin: 15px auto;
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .news-page {
    margin: 10px auto;
    padding: 0 10px;
  }
}

@media (max-width: 320px) {
  .news-page {
    margin: 8px auto;
    padding: 0 8px;
  }
}
.media-about img {
  cursor: pointer;            
  pointer-events: none;       
}
/* ===== БАҚ: сетка как у новостей ===== */
.baq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* карточка */
.baq-card {
  background: var(--white);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  display: block;
}

/* текстовый контейнер */
.baq-text {
  margin-top: 10px;
}

/* ... ары қарай */
.baq-more {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
}
@media (max-width: 768px) {
  .baq-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== БАҚ: ОБРЕЗКА ТЕКСТА ===== */

.baq-preview-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;

  overflow: hidden;
  line-height: 1.6;
  max-height: calc(1.6em * 5);
}

/* раскрытие карточки */
.baq-card.expanded .baq-preview-text {
  -webkit-line-clamp: unset;
  max-height: none;
}

/* ===== БАҚ: обрезка заголовка ===== */

.baq-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;

  overflow: hidden;
  line-height: 1.6;
  max-height: calc(1.6em * 5);
}

/* раскрытие */
.baq-card.expanded .baq-title {
  -webkit-line-clamp: unset;
  max-height: none;
}

.baq-card,
.baq-card h3 {
  text-decoration: none;
}

/* на всякий случай — если браузер упрямый */
.baq-card h3 {
  border-bottom: none;
}
.slide-contain {
  background: url('/img/backgound_t.jpeg') center / cover no-repeat;
}

.slide-contain img {
  object-fit: contain;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.4);
}
/* ===== ТИПОГРАФИКА ТОЛЬКО ДЛЯ БЛОКА ЗАВЕДУЮЩЕЙ ===== */

.page-zaved .page-text {
  line-height: 1.55;      /* было 1.8 — слишком рыхло */
  margin-bottom: 12px;    /* общий отступ меньше */
}

/* абзацы внутри текста */
.page-zaved .page-text p {
  margin-bottom: 10px;    /* между абзацами */
}

/* если текст без <p>, но с переносами */
.page-zaved .page-text br {
  display: block;
  margin-bottom: 6px;
  content: "";
}
@media (max-width: 768px) {
  .page-zaved .page-text {
    line-height: 1.6;
  }
}
