body {
  font-family: "Segoe UI", Tahoma, Geneva, Vardana, Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
  background: #ffeef4;
  flex-direction: column;
}

.container {
  width: 600px;
  border: 2px solid #f8cdd9;
  border-radius: 12px;
  padding: 20px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  flex-grow: 1;
}

/* заголовок */
header {
  text-align: center;
  color: #e0a4b6;
}

header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
}

.site-header {
  background: #e0a4b6;
  color: #fff;
  padding: 15px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo h1 {
  margin: 0;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav ul li {
  margin-left: 25px;
}

.nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s, transform 0.3s;
}

.nav ul li a:hover {
  color: #ffecec;
  transform: scale(1.05);
}

.btn-login {
  text-decoration: none;
  color: #e0a4b6;
  background: #fff;
  padding: 8px 20px;
  border-radius: 5px;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
  display: inline-block;
  text-align: center;
}

.btn-login:hover {
  color: #c23b70;
}

.header-buttons .btn-login {
  text-decoration: none;
  color: #e0a4b6;
  background: #fff;
  padding: 8px 20px;
  border-radius: 5px;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
}

.header-buttons .btn-login:hover {
  background: #ffecec;
  color: #c23b70;
}

.mobile-menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

.mission {
  font-size: 16px;
  color: #8b3f60;
  margin-top: 5px;
}

/* блок с фоном */
.hero {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  margin: 15px 0;
  background: url("1.jpg") center/cover no-repeat;
}

/* информация */
.info {
  text-align: center;
  margin: 20px 0;
  color: #5c3a4a;
}

/* авторизация */
.auth-box {
  text-align: center;
  margin: auto;
}

.auth-box h2 {
  margin-bottom: 20px;
  color: #e0a4b6;
}

form {
  border: 2px solid #f8cdd9;
  padding: 30px 60px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-radius: 10px;
  background: #fff5f8;
}

/* группы */
.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.form-group label {
  color: #5c3a4a;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #f3aac3;
  border-radius: 6px;
  outline: none;
  transition: border 0.3s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
  border: 1px solid #d94f87;
}

/* чекбокс */
.checkbox {
  flex-direction: row;
  align-items: center;
}

.checkbox label {
  margin-left: 8px;
}

/* кнопки */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-link {
  display: inline-block;
  text-decoration: none;
  width: 100%;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
}

.btn-primary,
.btn-secondary {
  padding: 10px;
  background: #e0a4b6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
}

.btn-primary:hover,
.btn-secondary:hover {
  background: #e0a4b6;
}

/* футер */
.site-footer {
  background: #222;
  color: #fff;
  padding: 50px 20px 20px 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  flex: 1 1 200px;
  margin: 15px;
}

.footer-column h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #e0a4b6;
}

.footer-column p,
.footer-column a {
  color: #ccc;
  text-decoration: none;
  line-height: 1.6;
}

.footer-column a:hover {
  color: #e0a4b6;
}

.socials a {
  display: inline-block;
  margin-right: 10px;
  transition: color 0.3s;
}

.socials a:hover {
  color: #e0a4b6;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 14px;
  color: #aaa;
  border-top: 1px solid #444;
  margin-top: 20px;
}

.socials {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.socials a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s;
}

.socials a:hover {
  opacity: 0.8;
}

.error-message {
  color: #fff;
  background-color: #e74c3c;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px 0;
  text-align: center;
}

.error-message-index {
  color: #e74c3c;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px 0;
  text-align: center;
}

.profile-container {
  max-width: 900px;
  margin: 50px auto;
  padding: 0 20px;
}

.profile-header {
  text-align: center;
  margin-bottom: 40px;
}

.profile-header h1 {
  font-size: 36px;
  color: #333;
}

.profile-header .welcome {
  font-size: 18px;
  color: #666;
}

.profile-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  background: linear-gradient(135deg, #ffffff, #f9f9f9);
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 50px;
  border: 2px solid #f8cdd9;
}

.profile-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.profile-photo-block {
  flex: 1 1 200px;
  text-align: center;
}

.profile-photo img {
  border-radius: 50%;
  width: 160px;
  height: 160px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
}

.profile-photo img:hover {
  transform: scale(1.05);
}

.profile-photo-block .btn-edit {
  display: block;
  margin: 10px auto 0;
}

#photo-edit-form {
  margin-top: 10px;
}

.profile-info {
  flex: 2 1 300px;
  padding: 30px;
}

.profile-info-large {
  min-width: 400px;
}

.profile-info table {
  width: 100%;
  table-layout: fixed;
  margin-bottom: 20px;
}

.profile-info table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  color: #555;
}

.profile-info table td:first-child {
  font-weight: bold;
  color: #333;
  width: 120px;
}

.btn-logout {
  display: inline-block;
  text-decoration: none;
  background: #e0a4b6;
  color: #fff;
  padding: 12px 30px;
  border-radius: 8px;
  transition: background 0.3s, transform 0.3s;
}

.btn-logout:hover {
  background: #e0a4b6;
  transform: scale(1.05);
}

.edit-form {
  display: none;
  margin-top: 10px;
}

.btn-edit,
.btn-save {
  background: #d94f87;
  color: #fff;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

.btn-edit:hover,
.btn-save:hover {
  background: #d94f87;
}

textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  resize: vertical;
}

/* по умолчанию скрываем */
#valid_email,
#invalid_email,
#valid_password,
#invalid_password,
#valid_first_name,
#invalid_first_name,
#valid_last_name,
#invalid_last_name {
  display: none;
}

/* зелёная галочка */
#first_name:valid ~ #valid_first_name,
#last_name:valid ~ #valid_last_name,
#email:valid ~ #valid_email,
#password:valid ~ #valid_password {
  display: inline-block;
  color: green;
}

/* красный крест */
#first_name:invalid ~ #invalid_first_name,
#last_name:invalid ~ #invalid_last_name,
#email:invalid ~ #invalid_email,
#password:invalid ~ #invalid_password {
  display: inline-block;
  color: red;
}

.hint {
  font-size: 12px;
  color: #888;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-row input {
  flex: 1;
}

/* Услуги - карточки */
.services-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 1200px;  /* ограничиваем максимальную ширину */
  width: 100%;         /* занимать всю доступную ширину контейнера */
  margin: 0 auto;      /* центрирование */
  padding: 0 10px;     /* немного отступов слева/справа */
  box-sizing: border-box;
}

.service-card {
  flex: 0 0 32%; /* три карточки в ряд на больших экранах */
  box-sizing: border-box;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  padding: 10px;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-card .info {
  padding: 15px;
}

.service-card .info h3 {
  margin-top: 0;
  color: #e0a4b6;
}

.service-card .price {
  font-weight: bold;
  margin-top: 10px;
  color: #c23b70;
}

.services-intro {
  text-align: center;
  margin: 40px auto 20px auto;
  max-width: 800px;
  color: #5c3a4a;
}

.services-intro h2 {
  font-size: 28px;
  color: #e0a4b6;
  margin-bottom: 10px;
}

.services-intro p {
  font-size: 16px;
}

.pagination {
  text-align: center;
  margin: 20px 0 50px 0;
}

.pagination a {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  background: #e0a4b6;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}

.pagination a.current,
.pagination a:hover {
  background: #d94f87;
}

.contact-page .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  margin-top: 30px;
}

.contact-info,
.contact-form {
  flex: 1 1 45%;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-info h3,
.contact-form h3 {
  color: #e0a4b6;
}

.contact-info p,
.contact-form label {
  color: #5c3a4a;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.contact-form button.btn-save {
  background-color: #e0a4b6;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.contact-form button.btn-save:hover {
  background-color: #c23b70;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 5px;
  color: #fff;
  display: none;
  z-index: 1000;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  align-items: center;
  justify-content: space-between;
  min-width: 250px;
}
.notification button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  margin-left: 10px;
  cursor: pointer;
}

.contact-form * {
  box-sizing: border-box;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
}

/* адаптивность */
@media (max-width: 650px) {
  .container {
    width: 95%;
    padding: 15px;
  }

  header h1 {
    font-size: 24px;
  }

  .mission {
    font-size: 14px;
  }

  .hero {
    height: 140px;
  }

  form {
    padding: 15px;
  }

  footer {
    font-size: 12px;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
  }

  .profile-photo-block,
  .profile-info {
    flex: 1 1 100%;
  }

  .profile-photo-block {
    margin-bottom: 20px;
  }

  .profile-info {
    padding: 15px;
    width: 100%;
    text-align: left;
  }

  .profile-info table td:first-child {
    width: auto;
    font-weight: bold;
  }

  .nav {
    display: none;
    flex-direction: column;
    background: #e0a4b6;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
  }

  .nav.active {
    display: flex;
  }
  .nav ul {
    flex-direction: column;
    padding: 0;
    margin: 0;
    width: 100%;
  }
  .nav ul li {
    margin: 10px 0;
    text-align: center;
  }
  .mobile-menu-toggle {
    display: block;
  }

  .service-card {
    flex: 0 0 95%; /* почти вся ширина контейнера */
    margin: 0 auto; /* центрируем карточку */
  }

  .services-container {
    padding: 0; /* убираем внутренние отступы контейнера */
    gap: 15px;   /* уменьшаем расстояние между карточками */
  }

  .contact-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .contact-info,
  .contact-form {
    flex: 1 1 100%;
  }
}
