/* CSS ПЕРЕМЕННЫЕ */
:root {
  --primary-color: #2F7D72;
  --secondary-color: #1F5E56;
  --accent-color: #C9A227;
  --gold-color: #C9A227;
  --danger-color: #B84A4A;
  --success-color: #3E8F68;
  --surface-dark: #101820;
  --surface-muted: #17242E;
  --text-color: #263238;
  --text-light: #6F7B83;
  --bg-color: #fff;
  --bg-light: #f9f9f9;
  --border-color: #ddd;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --radius: 15px;
}

/* БАЗОВЫЕ СТИЛИ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ТИПОГРАФИЯ */
h1, h2, h3 { font-weight: 700; }
h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }

a { color: var(--primary-color); text-decoration: none; }
a:hover { opacity: 0.8; }

/* КНОПКИ */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 12px 30px;
  font-weight: 600;
}

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

.btn-login {
  background: transparent;
  color: var(--text-light);
  border: 2px solid #333;
  padding: 8px 20px;
  font-weight: 600;
}

.btn-login:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.account-menu {
  position: relative;
}

.account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background: var(--surface-muted);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.account-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 48px;
  min-width: 190px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 300;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
  display: block;
}

.account-dropdown button {
  width: 100%;
  padding: 12px 14px;
  background: white;
  color: var(--text-color);
  text-align: left;
  border-radius: 0;
}

.account-dropdown button:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

.btn-outline {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--border-color);
  padding: 10px 20px;
}

/* МОДАЛИ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  max-width: 450px;
  width: 90%;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.close-btn {
  background: transparent;
  font-size: 24px;
  color: var(--text-light);
  padding: 0;
  width: 30px;
  height: 30px;
}

/* ФОРМА */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* СЕТКИ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* АДАПТИВ */
@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Доступность: видимый фокус и отключение анимаций по системной настройке */
:focus-visible { outline: 3px solid #2F7D72; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
