/* ===== CSS ПЕРЕМЕННЫЕ ===== */
:root {
  --color-header: #1a1a2e;
  --color-footer: #1a1a2e;
  --color-text: #222;
  --color-text-light: #fff;
  --color-btn: #e94560;
  --color-btn-hover: #c73652;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.15);
  --transition: 0.2s ease;
}

/* ===== СБРОС И БАЗА ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden { display: none !important; }

/* ===== HEADER ===== */
.header {
  background: var(--color-header);
  color: var(--color-text-light);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.about-link {
  color: var(--color-text-light);
  font-weight: 600;
  padding: 6px 14px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition);
}
.about-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* ===== СЕКЦИИ ===== */
.section {
  padding: 60px 0;
}

.section .container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.section--reverse .container,
.section .container.section--reverse {
  flex-direction: row-reverse;
}

/* Секция формы — блочная раскладка по центру */
.section--form .container {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section--form .form {
  width: 100%;
  text-align: left;
}

/* Цвета блоков */
.section--blue   { background: #dbeafe; }
.section--green  { background: #dcfce7; }
.section--orange { background: #ffedd5; }
.section--purple { background: #ede9fe; }
.section--teal   { background: #ccfbf1; }
.section--form   { background: #f1f5f9; }

.section__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section__title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1e293b;
}

.section__text {
  font-size: 1rem;
  color: #475569;
  max-width: 500px;
}

/* Серый блок-заглушка вместо картинки */
.placeholder-img {
  flex-shrink: 0;
  width: 320px;
  height: 220px;
  background: #94a3b8;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
}
.placeholder-img::after {
  content: '[ изображение ]';
}

/* ===== ФОРМА ===== */
.form {
  margin-top: 32px;
  max-width: 600px;
}

.form__group {
  margin-bottom: 20px;
}

.form__group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
  font-size: 0.95rem;
}

.form__group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__group input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}

.required { color: #e94560; }

.form__message {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  display: none;
}
.form__message.success {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.form__message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ===== КНОПКА ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn--primary {
  background: var(--color-btn);
  color: #fff;
  box-shadow: 0 4px 14px rgba(233,69,96,0.4);
}
.btn--primary:hover {
  background: var(--color-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(233,69,96,0.5);
}
.btn--primary:active {
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-footer);
  color: var(--color-text-light);
  padding: 20px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 520px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
  transition: color var(--transition);
}
.modal__close:hover { color: var(--color-btn); }

.modal__content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.modal__photo-wrap { flex-shrink: 0; }

.modal__photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
}

.modal__photo-placeholder {
  width: 120px;
  height: 120px;
  background: #94a3b8;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
}

.modal__body {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.modal__text {
  font-size: 1rem;
  color: #334155;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
  .section .container { flex-direction: column; }
  .section--reverse .container,
  .section .container.section--reverse { flex-direction: column; }

  .placeholder-img { width: 100%; height: 180px; }

  .section__title { font-size: 1.4rem; }

  .modal__content { flex-direction: column; align-items: center; }
  .modal__text { text-align: center; }
}

@media (max-width: 480px) {
  .header__inner { flex-direction: column; gap: 10px; }
  .footer__inner { flex-direction: column; text-align: center; }
}
