/* ========== Секция материалов ========== */
.materials-section {
  padding: 1rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

/* ========== Карточки материалов ========== */
.material-card {
  background: #fff;
  border-radius: 1.35em;
  box-shadow: 0 2px 16px 0 rgba(55, 185, 195, 0.09);
  border: 1px solid #d5f9f6;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.material-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(55, 185, 195, 0.15);
}

.material-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--main-gradient);
  color: white;
  font-size: 1.5rem;
}

.material-card h3 {
  color: #217895;
  margin-bottom: 1rem;
}

.material-card p {
  color: #16707c;
  opacity: 0.87;
  margin-bottom: 1.5rem;
}

/* ========== Кнопки ========== */
.btn-primary {
  background: var(--main-gradient);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 1em;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--accent-gradient);
  transform: translateY(-2px);
}

.btn-search {
  background: var(--main-gradient);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 1.2em;
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(55, 185, 195, 0.3);
}

.btn-search:hover {
  background: var(--accent-gradient);
  transform: translateY(-2px);
}

.btn-back-to-list {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

/* ========== CAPTCHA стили ========== */
.captcha-container {
  background: #fff;
  border-radius: 1.35em;
  box-shadow: 0 2px 16px 0 rgba(55, 185, 195, 0.09);
  border: 1px solid #d5f9f6;
  padding: 2em;
  margin: 2em auto;
  max-width: 400px;
  text-align: center;
}

.captcha-image {
  margin: 1em 0;
  border: 2px solid #e6faf8;
  border-radius: 0.8em;
  padding: 0.5em;
  background: #f9fdfd;
}

.captcha-input {
  width: 200px;
  padding: 0.8em;
  border: 2px solid #d1f6f6;
  border-radius: 0.8em;
  font-size: 1.1em;
  text-align: center;
  margin: 0.5em 0;
}

.captcha-error {
  color: #e74c3c;
  margin: 0.5em 0;
  font-weight: 500;
}

.refresh-captcha {
  background: none;
  border: none;
  color: #35b8d5;
  cursor: pointer;
  font-size: 0.9em;
  text-decoration: underline;
  margin-top: 0.5em;
}

/* ========== Список материалов ========== */
.materials-list {
  margin-top: 2rem;
}

.material-item {
  background: #fff;
  border-radius: 1.35em;
  box-shadow: 0 2px 16px 0 rgba(55, 185, 195, 0.09);
  border: 1px solid #d5f9f6;
  padding: 1.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.material-item:hover {
  box-shadow: 0 4px 20px rgba(55, 185, 195, 0.12);
}

.material-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.material-title {
  color: #217895;
  margin: 0;
  flex: 1;
}

.material-meta {
  color: #7a9ba8;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.material-up-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.material-content {
  background: #fff;
  border: 1px solid #d5f9f6;
  border-radius: 1.35em;
  padding: 0.5rem;
  box-shadow: 0 2px 16px 0 rgba(55, 185, 195, 0.09);
  color: #16707c;
  line-height: 1.6;
  white-space: pre-line;
  margin-top: 0.1rem;
}

/* ========== Фильтры ========== */
.filters-container {
  background: #fff;
  border-radius: 1.35em;
  box-shadow: 0 2px 16px 0 rgba(55, 185, 195, 0.09);
  border: 1px solid #d5faf7;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.7rem;
  border: 2px solid #d1f6f6;
  border-radius: 0.8em;
  background: white;
  min-width: 200px;
}
