/* ===== Университеты: общий стиль ===== */

.university-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Nunito", sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
}

.university-header {
  text-align: center;
  margin-bottom: 30px;
}

.university-header img {
  max-width: 400px;
  height: auto;
  margin-bottom: 15px;
}

.university-header h1 {
  font-size: 2rem;
  margin: 10px 0;
}

.university-section {
  margin-bottom: 40px;
}

.university-section h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  border-bottom: 2px solid #1565c0;
  display: inline-block;
  padding-bottom: 5px;
}

.university-section p {
  margin: 5px 0;
}

.university-specialties {
  list-style: none;
  padding-left: 0;
}

.university-specialties li {
  background: #f5f9ff;
  margin: 5px 0;
  padding: 8px 12px;
  border-radius: 8px;
}

/* ===== Архив университетов ===== */

.archive-university-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.archive-university-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.archive-university-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.archive-university-item .university-logo img {
  max-width: 120px;
  height: auto;
  margin-bottom: 15px;
}

.archive-university-item h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.archive-university-item p {
  font-size: 0.95rem;
  color: #555;
  margin: 6px 0;
}

.archive-university-item .university-readmore {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.archive-university-item .university-readmore:hover {
  background: #005177;
}

/* ===== Форма фильтров ===== */

.university-filter {
  margin-bottom: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.university-filter label {
  font-weight: 600;
  margin-right: 5px;
}

.university-filter select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* ===== Адаптивность для мобильных ===== */

@media (max-width: 600px) {
  .archive-university-list {
    grid-template-columns: 1fr;
  }

  .university-filter {
    flex-direction: column;
    align-items: flex-start;
  }

  .university-filter select {
    width: 100%;
  }
}

/* === Аккордеон для программ === */
.accordion-item {
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.accordion-header {
  width: 100%;
  text-align: left;
  background: #2c3e50;
	border-radius: 2px !important;
  border: none;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: #1a252f;
}

.accordion-header:focus,
.accordion-header:active {
    background: #2c3e50; /* тот же цвет, что и обычный */
    color: #fff;
    outline: none; /* убираем зелёную рамку */
    box-shadow: none; /* убираем зелёное свечение */
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 16px;
}

.accordion-item.open .accordion-content {
    max-height: 2000px;
    padding: 8px 20px 25px 20px; /* сверху меньше (8px), по бокам 20px, снизу 25px */
}


.accordion-header .arrow {
  transition: transform 0.3s ease;
}

.accordion-item.active .arrow {
  transform: rotate(180deg);
}
.accordion-content {
    white-space: pre-line; /* сохраняет переносы строк */
}

/* Ссылки внутри контента аккордеона */
.accordion-content a {
    color: #1565c0; /* цвет ссылки — синий, можно поменять */
    text-decoration: underline; /* подчеркивание, можно убрать, если не нужно */
    transition: color 0.2s ease;
}

.accordion-content a:hover {
    color: #0d3b73; /* цвет при наведении */
    text-decoration: underline; /* можно убрать или оставить */
}

/* --- Фиксы для мобильной версии --- */
.university-container {
  box-sizing: border-box;
  overflow-x: hidden;
  max-width: 900px; /* вернул десктопное ограничение */
}

.university-header img,
.university-banner {
  max-width: 100%;
  height: auto;
  display: block;
}

.accordion-content {
  word-wrap: break-word;
}

@media (max-width: 600px) {
  .university-container {
    max-width: 100%; /* только на мобилках */
    padding: 15px;
  }

  .university-header img {
    max-width: 100%;
  }

  .accordion-content {
    padding: 8px 12px 20px 12px;
  }
}

/* Центрирование логотипа */
.university-header__logo img,
.university-header img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

