/* ==========================
   Базовые стили
========================== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #ff7b00, #0077ff);
  color: #fff;
  padding: 2rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header p {
  margin-top: 0.5rem;
  font-size: 1.2rem;
}

nav {
  background: #f4f4f4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem;
}

nav a {
  text-decoration: none;
  color: #0077ff;
  font-weight: bold;
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h2 {
  color: #ff7b00;
  margin-bottom: 1rem;
}

footer {
  text-align: center;
  background: #f4f4f4;
  padding: 1rem;
  margin-top: 2rem;
}

/* ==========================
   Универсальные элементы
========================== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  background: #0077ff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: #005fcc;
  transform: translateY(-2px);
}

.btn-orange {
  background: #f97316;
}

.btn-orange:hover {
  background: #fb923c;
}

/* ==========================
   Главная
========================== */
.welcome {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
}

.welcome h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1d4ed8;
}

.welcome h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  color: #f97316;
}

.actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ==========================
   Обо мне
========================== */
.about {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
}

.about-photo img {
  float: left;
  max-width: 250px;
  height: auto;
  margin: 0 1.5rem 1rem 0;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.about h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1d4ed8;
}

.about h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  color: #f97316;
}

@media (max-width: 768px) {
  .about-photo img {
    float: none;
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 70%;
  }
}

/* ==========================
   Услуги (цены)
========================== */
.pricing {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
  color: #333;
}

.pricing h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #1d4ed8;
}

.pricing-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pricing-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.pricing-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #f97316;
}

.pricing-card .price {
  display: block;
  font-weight: 700;
  color: #1d4ed8;
  font-size: 1.1rem;
}

/* ==========================
   Проекты / статьи / задания
========================== */
.projects, .articles, .tasks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background: #fafafa;
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.02);
}

.article-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

/* ==========================
   Контакты (форма)
========================== */
.contact-form {
  max-width: 650px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-form h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
  text-align: center;
}

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.form-row label {
  flex: 0 0 180px;
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  flex: 1;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.2s;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: #0077ff;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.article-thumb {
  max-width: 600px;   /* ограничивает ширину */
  height: auto;       /* сохраняет пропорции */
  display: block;     /* убирает "строчный" разъезд */
  margin: 1rem auto;  /* центрирует и добавляет отступы */
  border-radius: 8px; /* скруглённые углы — для красоты */
}

.auth-container {
  max-width: 420px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #222;
  font-size: 1.6rem;
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 1rem;   /* увеличиваем высоту и добавляем боковые отступы */
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.auth-form input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 6px rgba(0,123,255,0.35);
}

.form-errors, .field-errors {
  margin-top: 0.4rem;
  padding-left: 0.5rem;
  color: #b00020;
  font-size: 0.9rem;
}

.btn {
  display: block;
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}

.btn:hover {
  background: linear-gradient(135deg, #0069d9, #004085);
  transform: translateY(-2px);
}

.auth-link {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.95rem;
}
.auth-link a {
  color: #007bff;
  font-weight: 500;
  text-decoration: none;
}
.auth-link a:hover {
  text-decoration: underline;
}
