.publication-form-container {
  max-width: 900px;
  min-height: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--background-50);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.form-header {
  margin-bottom: 2rem;
  text-align: center;
}

.progress-indicator {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  gap: 0.5rem;
}

.progress-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--background-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-600);
  position: relative;
}

.progress-step.active {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 4px 8px rgba(85, 170, 170, 0.3);
}

.progress-step:not(:last-child):after {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(100% + 4px);
  width: 40px;
  height: 2px;
  background: var(--background-200);
  transform: translateY(-50%);
}

.form-section {
  display: none;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.form-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.publication-type-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.type-option {
  padding: 1.5rem 0.5rem;
  border: 2px solid var(--primary-100);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.type-option:hover {
  border-color: var(--primary-300);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.type-option.selected {
  border-color: var(--primary-500);
  background-color: var(--primary-50);
  box-shadow: 0 5px 15px rgba(85, 170, 170, 0.1);
}

.type-option i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-600);
}

.type-option span {
  font-weight: 500;
  display: flow;
  color: var(--text-800);
  align-content: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-800);
  font-size: 0.95rem;
}

.required {
  color: #e53935;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--primary-200);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  color: var(--text-800);
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(85, 170, 170, 0.2);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-600);
  margin-top: 0.25rem;
  display: block;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

button {
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: inherit;
}

button.next-step,
button.submit-button {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 4px 6px rgba(85, 170, 170, 0.2);
}

button.next-step:hover,
button.submit-button:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(85, 170, 170, 0.25);
}

button.prev-step {
  background: var(--background-200);
  color: var(--text-700);
}

button.prev-step:hover {
  background: var(--background-300);
  transform: translateY(-2px);
}

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

.preview-section {
  padding: 1.5rem;
  background: var(--background-100);
  border-radius: 10px;
  border-left: 3px solid var(--primary-500);
}

.preview-section h3 {
  margin-top: 0;
  color: var(--primary-700);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.preview-section p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* Адаптивность */
@media (max-width: 768px) {
  .publication-form-container {
    padding: 1rem;
  }
  
  .form-section {
    padding: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions button {
    width: 100%;
  }
  
  .progress-step:not(:last-child):after {
    width: 20px;
  }
}

/* Анимация для ошибок */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

input:invalid, textarea:invalid, select:invalid {
  animation: shake 0.5s ease;
  border-color: #ff9800;
}

/* Для скринридеров */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Для скрытых секций используем display: none вместо aria-hidden */
.form-section:not(.active) {
    display: none !important;
}

/* Улучшение фокуса для доступности */
.type-option:focus, 
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
}