/* === Переменные === */
:root {
  --color-text: #1d1d1f;
  --color-text-secondary: #555555;
  --color-accent: #0070f3;
  --color-accent-hover: #0059c9;
  --radius: 12px;
  --shadow: 0 4px 10px rgba(0,0,0,0.05);
  --font-main: Arial, sans-serif; /* позже подключим Google Fonts */
}

/* === Базовые стили === */
body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--color-text);
  line-height: 1.6;
}

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

/* === HEADER === */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo a {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav a {
  margin-left: 30px;
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
}

.nav a:hover {
  color: var(--color-accent);
}

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.burger span {
  width: 25px;
  height: 3px;
  background: var(--color-text);
  margin: 4px 0;
  transition: 0.3s;
}

/* Mobile */
@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: 60px;
    right: 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: none;
    flex-direction: column;
  }
  .nav a {
    margin: 10px 0;
  }
  .nav.open {
    display: flex;
  }
  .burger {
    display: flex;
  }
}

/* === HERO === */
.hero {
  text-align: center;
  padding: 100px 20px 60px;
  background: linear-gradient(135deg, #0070f3, #00c6ff);
  color: #fff;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 40px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
  padding: 10px 20px;
}

.search-icon {
  margin-right: 10px;
  font-size: 1.2rem;
  color: var(--color-text-secondary);
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 1rem;
  padding: 10px 0;
}

.search-box {
  position: relative; /* важно */
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
  padding: 12px 20px;
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 1.2rem;
  padding: 14px 0;
  border-radius: 50px;
}

#searchResults {
  position: absolute;
  top: 100%;   /* прямо под инпутом */
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 8px;
  padding: 10px 20px;
  text-align: left;
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}

#searchResults a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid #eee;
  transition: all 0.2s ease;
  line-height: 1.4;
}

/* эффект при наведении */
#searchResults a:hover {
  color: var(--color-accent);
  background: rgba(0, 112, 243, 0.05);
  padding-left: 8px; /* лёгкий сдвиг вправо */
}

/* убираем линию у последнего */
#searchResults a:last-child {
  border-bottom: none;
}

#searchResults:empty {
  display: none;
}

.features {
  padding: 80px 20px;
  text-align: center;
  background: #f9fafb;
}

.features h2 {
  font-size: 2rem;
  margin-bottom: 40px;
}

.features-list {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 20px;
  width: 280px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.feature-card .icon {
  margin-bottom: 15px;
  height: 60px;         /* фиксируем под будущие значки */
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card .icon img {
  max-height: 100%;
  max-width: 100%;
}

.feature-card p {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  margin: 0;
}


.examples {
  padding: 80px 20px;
  background: #fff;
}

.examples h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.example-card {
  background: #f9fafb;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.example-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.example-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.example-link:hover {
  color: var(--color-accent);
}

.example-meta {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}


.categories {
  padding: 80px 20px;
  background: #fff;
}

.categories h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

/* контейнер для всех категорий */
.category-grid {
  column-count: 3;              /* три колонки на десктопе */
  column-gap: 40px;
}

.category-block {
  break-inside: avoid;          /* не ломаем блоки при переносе */
  margin-bottom: 25px;
}

.letter {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 15px 0 10px;
}

.category-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-block li {
  margin-bottom: 6px;
}

.category-block a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 1rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.category-block a:hover {
  color: var(--color-accent);
  padding-left: 5px;
}

/* адаптив */
@media (max-width: 1024px) {
  .category-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .category-grid {
    column-count: 1;
  }
}

.howto {
  padding: 80px 20px;
  background: #f9fafb;
  text-align: center;
}

.howto h2 {
  font-size: 2rem;
  margin-bottom: 50px;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.step {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 20px;
  width: 280px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.step-number {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.step h3 {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.4;
}

.site-footer {
  background: #f9fafb; /* светлый фон */
  color: #333;
  padding: 50px 20px 20px;
  margin-top: 80px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--color-accent);
}

.footer-brand p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.4;
}

.footer-nav h4,
.footer-contact h4,
.footer-social h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #333;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 6px;
}

.footer-nav a,
.footer-contact a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--color-accent);
}

.footer-contact p {
  margin: 4px 0;
  font-size: 0.95rem;
}

.footer-social .social-links {
  display: flex;
  gap: 10px;
}

.footer-social a {
  font-size: 1.3rem;
  color: #555;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid #ddd;
  padding-top: 15px;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
}

/* === Category Page === */
.category-page {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.category-page h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #222;
}

/* Поисковая строка */
.category-page .live-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.category-page .live-search input {
    width: 100%;
    padding: 14px 45px;
    border: 1px solid #ddd;
    border-radius: 40px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: border-color 0.2s ease;
}

.category-page .live-search input:focus {
    border-color: #0077cc;
}

.category-page .live-search::before {
    content: "🔍";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}

/* Результаты поиска */
/* Контейнер поиска */
#categorySearchBox {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
}

/* Поле ввода */
#categorySearchInput {
    width: 100%;
    padding: 12px 16px;
    border-radius: 30px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Результаты поиска */
#categorySearchResults {
    display: none; /* по умолчанию скрыт */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    padding: 10px;
}


/* Стили самих элементов */
#categorySearchResults .search-item {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

#categorySearchResults .search-item:last-child {
    border-bottom: none;
}

#categorySearchResults a {
    text-decoration: none;
    color: #0077cc;
    font-weight: 500;
}

#categorySearchResults a:hover {
    text-decoration: underline;
}


/* Карточки задач */
.task-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.task-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.task-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.task-card h3 a {
    text-decoration: none;
    color: #0077cc;
    font-weight: 600;
}

.task-card h3 a:hover {
    text-decoration: underline;
}

.task-card p {
    font-size: 13px;
    color: #777;
}


/* === PAGINATION === */
#paginationBox {
    margin: 30px auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

#paginationBox a,
#paginationBox span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

#paginationBox a {
    background: #f5f5f5;
    color: #0077cc;
    border: 1px solid #ddd;
}

#paginationBox a:hover {
    background: #0077cc;
    color: #fff;
}

#paginationBox .current {
    background: #0077cc;
    color: #fff;
    font-weight: bold;
    border: 1px solid #0077cc;
}


/* ==== Хлебные крошки ==== */
/* ==== Хлебные крошки ==== */
.breadcrumbs {
    font-size: 14px;
    color: #666;
    margin: 15px 0 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-left: 20px;
}

.breadcrumbs a {
    color: #0077cc;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #005fa3;
    text-decoration: underline;
}

.breadcrumbs span {
    font-weight: 600;
    color: #000;
}

/* стрелка-иконка */
.breadcrumbs svg {
    width: 14px;
    height: 14px;
    fill: #999;
    flex-shrink: 0;
}


