@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Inter:wght@400;500&display=swap');

:root {
  --bg-color: #F9F7F3;
  --text-color: #2D2B28;
  --accent-color: #C77966;
  --secondary-accent: #8A9B68;
  --light-accent: #E8D7D2;
  --shadow: 0 4px 20px rgba(0,0,0,0.05);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.1);
  --border-radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

.button,
.secondary-button {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}

.button {
  background-color: var(--accent-color);
  color: white;
  box-shadow: 0 4px 12px rgba(199, 121, 102, 0.2);
}

.button:hover {
  background-color: #b36a5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(199, 121, 102, 0.25);
}

.secondary-button {
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.secondary-button:hover {
  background-color: rgba(199, 121, 102, 0.05);
}

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

.card {
  background: white;
  padding: 1.75rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card::after {
  content: "";
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
  opacity: 0.05;
  transition: all 0.5s ease;
}

.card:hover::after {
  transform: scale(1.2);
  opacity: 0.08;
}

.hero {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23ffffff' opacity='.25'/%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' fill='%23ffffff' opacity='.5'/%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
}

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

.feature-section {
  background: white;
  padding: 4rem 0;
}

.education-section {
  background: #F5F7F2;
  padding: 4rem 0;
  position: relative;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.author-signature {
  font-size: 1.125rem;
  color: var(--text-color);
  margin: 2rem 0;
  text-align: center;
  padding: 1rem;
  background-color: rgba(199, 121, 102, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--accent-color);
  font-weight: 500;
}

.ethics-note {
  font-size: 0.875rem;
  color: #777;
  margin-top: 2rem;
  text-align: center;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Формы */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(199, 121, 102, 0.1);
}

/* Страница тестов */
.test-container {
  max-width: 800px;
  margin: 0 auto;
}

.test-intro {
  margin-bottom: 2rem;
}

.test-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.question {
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.question h3, .question h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.options label:hover {
  background: rgba(199, 121, 102, 0.1);
}

.options input[type="radio"] {
  margin: 0;
}

.test-results {
  margin-top: 3rem;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
}

.disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(255, 229, 229, 0.3);
  border-radius: 8px;
  border-left: 3px solid #ff6b6b;
}

/* Страница тестов (список) */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.test-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.test-card h3 {
  margin-top: 0;
  color: var(--accent-color);
}

.test-card p {
  color: #666;
  margin-bottom: 1rem;
}

/* Страница для родителей */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.category-card h3 {
  margin-top: 0;
  color: var(--accent-color);
}

.category-card p {
  color: #666;
  margin-bottom: 1rem;
}

/* Кружок */
.club-registration {
  max-width: 600px;
  margin: 2rem auto;
}

.club-form {
  display: grid;
  gap: 1.5rem;
}

/* Админ панель */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.admin-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.admin-card h3 {
  margin-top: 0;
  color: var(--accent-color);
}

/* Профиль */
.profile-header {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
}

.profile-info h2 {
  margin-top: 0;
}

.test-history {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.test-history table {
  width: 100%;
  border-collapse: collapse;
}

.test-history th,
.test-history td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.test-history th {
  font-weight: 600;
  color: var(--text-color);
}

.signature {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-top: 3rem;
  font-style: italic;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .features-grid,
  .tests-grid,
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
}
/* Дополнительные стили для навигации */
.nav-spacer {
  height: 70px; /* Высота навигации + отступ */
}

@media (max-width: 768px) {
  .nav-spacer {
    height: 100px; /* Больше места на мобильных */
  }
}

/* Убираем inline-стили из компонентов */
.custom-button {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}

/* Центрирование текста */
.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

/* Отступы */
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }

.ml-1 { margin-left: 0.5rem !important; }
.ml-2 { margin-left: 1rem !important; }
.ml-3 { margin-left: 1.5rem !important; }

.mr-1 { margin-right: 0.5rem !important; }
.mr-2 { margin-right: 1rem !important; }
.mr-3 { margin-right: 1.5rem !important; }

/* Ширина 100% */
.w-100 {
  width: 100% !important;
}

/* Демо-аккаунты */
.demo-accounts {
  margin-top: 2rem;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #666;
}

.demo-accounts p {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

/* Формы входа/регистрации */
.login-form,
.register-form,
.contact-form {
  max-width: 500px;
  margin: 0 auto;
}

/* FAQ стили */
.faq h3 {
  color: var(--accent-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.faq p {
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--light-accent);
}

/* Исправление наезда навигации */
main {
  padding-top: 20px; /* Добавляем отступ сверху для контента */
}

.hero {
  padding-top: 100px; /* Уменьшаем отступ, так как навигация фиксированная */
}

@media (max-width: 768px) {
  .hero {
    padding-top: 80px;
  }
}

.about-photo {
  text-align: center;
}

.profile-photo {
  width: 300px;
  height: auto; /* автоматическая высота */
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin: 0 auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* === ИСПРАВЛЕНИЕ НАВБАРА НА МОБИЛЬНЫХ === */
.custom-navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

/* На узких экранах — делаем flex-wrap и центрируем */
@media (max-width: 768px) {
  .custom-navbar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  .auth-section {
    margin: 0;
    align-self: flex-end;
  }

  .logo {
    width: 100%;
    text-align: center;
  }
}

/* === ИСПРАВЛЕНИЕ ГРАДИЕНТА НА МОБИЛЬНЫХ === */
@media (max-width: 768px) {
  .hero {
    padding-bottom: 40px; /* Уменьшаем нижний отступ */
    position: relative;
    z-index: 1;
    overflow: hidden;
  }
  
  /* Убираем градиентную волну на мобильных полностью */
  .hero::before {
    display: none !important;
  }
  
  /* Альтернатива: если нужно оставить, но сделать ниже - раскомментируйте:
  .hero::before {
    height: 30px;
    opacity: 0.2;
    bottom: -10px;
  }
  */
  
  /* Добавляем простую линию вместо градиента */
  .hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
    border-radius: 2px;
  }
  
  /* Исправляем отступы в тексте */
  .hero p {
    padding: 0 15px;
    font-size: 1rem;
  }
  
  .hero h1 {
    padding: 0 10px;
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  /* Убираем возможные конфликты z-index */
  .hero .container {
    position: relative;
    z-index: 2;
  }
  
  /* Исправляем подпись автора */
  .author-signature {
    margin: 1.5rem 1rem;
    padding: 1rem;
    font-size: 0.95rem;
  }
  
  /* Кнопки на мобильных */
  .cta-buttons {
    gap: 0.8rem;
    padding: 0 20px;
  }
  
  .button,
  .secondary-button {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
  .hero {
    padding-top: 50px;
    padding-bottom: 30px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  .author-signature {
    font-size: 0.9rem;
    padding: 0.8rem;
  }
  
  .ethics-note {
    font-size: 0.8rem;
    padding: 0 15px;
  }
}

/* === ИСПРАВЛЕНИЕ ДЛЯ ПЛАНШЕТОВ === */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero::before {
    height: 60px;
    opacity: 0.7;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
}

/* === ИСПРАВЛЕНИЕ ВЫРАВНИВАНИЯ КНОПОК В ТЕСТАХ === */
.tests-grid .test-card {
  display: flex;
  flex-direction: column;
}

.tests-grid .test-card > * {
  flex: 1 0 auto;
}

.tests-grid .test-card h3,
.tests-grid .test-card p,
.tests-grid .test-card .duration {
  margin-bottom: 0.5rem;
}

.tests-grid .test-card .button {
  margin-top: auto;
  align-self: flex-start;
}
