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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: #333;
  background: #f8f9fa;
}

/* Шапка с фоном дома */
.hero {
  background: url('../images/house.jpg') center/cover no-repeat;
  height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  color: white;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* Затемнение фона */
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: white;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.85;
}

.hero h1 {
  font-size: 2.8rem;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  max-width: 800px;
}

/* Основной контент */
.content {
  min-height: calc(100vh - 500px - 70px); /* Учитывает высоту хедера и футера */
}

.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #005a9c;
  font-size: 1.8rem;
}

/* Карточки членов правления */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.8rem;
  margin-top: 1rem;
}

.card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
  color: #005a9c;
}

.card p {
  margin: 0 1rem 1rem;
  color: #555;
}

/* Новости */
.news-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed #ccc;
}

.news-item h3 {
  color: #005a9c;
  margin-bottom: 0.5rem;
}

.news-item time {
  display: block;
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.news-item a {
  color: #005a9c;
  text-decoration: none;
  font-weight: 500;
}

.news-item a:hover {
  text-decoration: underline;
}

/* Футер */
footer {
  text-align: center;
  padding: 1.5rem;
  background: #005a9c;
  color: white;
  font-size: 0.95rem;
}

/* Адаптивность */
@media (max-width: 768px) {
  .hero {
    height: 400px;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section {
    padding: 2.5rem 1rem;
  }

  .section h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  footer {
    font-size: 0.9rem;
  }
}

 /* === Аутентификация и профиль === */

.auth-section,
.profile-section {
  padding: 40px 20px;
  background: #f9fafa;
}

.auth-container,
.profile-container {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}

.auth-container h2,
.profile-container h2 {
  text-align: center;
  color: #1a1a1a;
  margin-bottom: 12px;
  font-size: 1.5em;
}

.auth-container p,
.profile-container p {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
  font-size: 0.95em;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #333;
  font-weight: 500;
  font-size: 0.95em;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-group file {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  transition: border 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-primary {
  background: #007bff;
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 1em;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #0056b3;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  margin-bottom: 16px;
  font-size: 0.95em;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  margin-bottom: 16px;
  font-size: 0.95em;
}

.auth-hint {
  margin-top: 24px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 0.9em;
  color: #495057;
}

.auth-hint ul {
  margin: 8px 0;
  padding-left: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }

  .auth-container,
  .profile-container {
    padding: 20px;
  }
}

 /* Округлённые поля ввода */
.form-control,
.form-select {
  border-radius: 12px !important;
  padding: 10px 14px;
  font-size: 1rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
}

/* Фокус с красивой обводкой */
.form-control:focus,
.form-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2) !important;
  outline: none;
}

/* Поле загрузки файла — больше отступов */
.form-control[type="file"] {
  padding-top: 8px;
  padding-bottom: 8px;
  background-color: #f8f9fa;
}

/* Подсказка под полем */
.form-text {
  margin-top: 6px;
  font-size: 0.875em;
}

/* Кнопка — тоже скруглённая */
.btn {
  border-radius: 12px;
  font-weight: 500;
}

.btn-success {
  background: #28a745;
  border: none;
}

.btn-success:hover {
  background: #218838;
}


.card {
  border-radius: 16px !important;
  overflow: hidden;
}

.card-header {
  border-bottom: none !important;
  font-weight: 500;
}

.alert {
  border-radius: 12px;
  padding: 12px 16px;
}
