/*
Theme Name: 0n3
Theme URI: https://example.com/
Author: 0n3
Description: Максимально лёгкая WordPress-тема для SEO-контентных сайтов. Gutenberg-first, без Elementor и внешних зависимостей.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: 0n3
*/

:root {
  --content-width: 760px;
  --wide-width: 1100px;
  --gap: 24px;
  --text: #202124;
  --muted: #6b7280;
  --border: #e5e7eb;
  --link: #1558d6;
  --bg: #fff;
  --code: #f5f6f8;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.site-header__inner,
.site-main,
.site-footer__inner {
  width: min(calc(100% - 32px), var(--wide-width));
  margin-inline: auto;
}

.site-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-branding { min-width: 0; }
.site-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 750;
}
.site-description {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-menu a { color: var(--text); font-size: 15px; }

.site-main { padding-block: 42px 60px; }

.content-area {
  width: min(100%, var(--content-width));
  margin-inline: auto;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumbs a { color: var(--muted); }

.entry-title,
.page-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.entry-meta {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.entry-content > * { margin-top: 0; margin-bottom: 1.25em; }
.entry-content h2 { margin-top: 1.8em; font-size: 30px; line-height: 1.25; }
.entry-content h3 { margin-top: 1.6em; font-size: 24px; line-height: 1.3; }
.entry-content h4 { margin-top: 1.5em; font-size: 20px; }

.entry-content blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--border);
  color: #4b5563;
}

.entry-content pre {
  overflow-x: auto;
  padding: 18px;
  background: var(--code);
  border-radius: 6px;
}

.entry-content code {
  padding: .15em .35em;
  background: var(--code);
  border-radius: 4px;
}

.entry-content pre code { padding: 0; background: transparent; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
}
.entry-content th,
.entry-content td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.post-card {
  padding-block: 26px;
  border-bottom: 1px solid var(--border);
}
.post-card:first-child { padding-top: 0; }
.post-card__title {
  margin: 0 0 7px;
  font-size: 25px;
  line-height: 1.3;
}
.post-card__excerpt { color: #4b5563; }
.post-card__meta { color: var(--muted); font-size: 13px; }

.pagination { margin-top: 30px; }
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
}
.pagination .current { background: #f3f4f6; color: var(--text); }

.search-form {
  display: flex;
  gap: 8px;
}
.search-form label { flex: 1; }
.search-form input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #cfd4dc;
  border-radius: 5px;
  font: inherit;
}
.search-form button {
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-radius: 5px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.site-footer__inner { padding-block: 28px; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header__inner {
    padding-block: 14px;
    align-items: flex-start;
    flex-direction: column;
  }
  .primary-menu { gap: 10px 14px; }
  .site-main { padding-block: 30px 45px; }
  .entry-title, .page-title { font-size: 32px; }
  .entry-content h2 { font-size: 26px; }
}

/* Стиль для выпадающих списков с + */
.additional-links summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    list-style: none;
}
/* Стиль для выпадающих списков с + */


/* ==========================================
   АНОНСЫ СТАТЕЙ
========================================== */

.post-card__excerpt {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;

    overflow: hidden !important;

    line-height: 1.6 !important;
    max-height: 4.8em !important;
}


/* Ссылка "Читать далее" */

.post-card__more {
    display: inline-block !important;

    margin-top: 10px;

    text-decoration: none;
}

.post-card__more:hover {
    text-decoration: underline;
}

/* ========================================
   Страница "Обо мне" — 0n3
   ======================================== */

.about-page {
    width: 100%;
}


/* Вводный текст */

.about-intro {
    margin-bottom: 30px;
}

.about-intro p {
    font-size: 17px;
    line-height: 1.75;
    margin: 0;
}


/* Заголовок "Инструменты" */

.about-page > h2 {
    margin: 0 0 25px;
}


/* ========================================
   Группы инструментов
   ======================================== */

.tools-group {
    margin: 0 0 28px !important;
}

/* Расстояние между группами */

.tools-group + .tools-group {
    margin-top: 28px !important;
}


/* Заголовки Софт / Нейросети / Технологии */

.tools-group h3 {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;

    margin: 0 0 12px !important;
    padding: 0;

    background: transparent;
    border: 0;
}


/* ========================================
   Сетка карточек
   ======================================== */

.tools-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 10px 12px;

    margin: 0;
    padding: 0;
}


/* ========================================
   Карточка инструмента
   ======================================== */

.tool-card {
    display: flex;
    align-items: center;

    gap: 13px;

    min-height: 56px;

    padding: 10px 14px;

    background: #fff;

    border: 1px solid #e5e5e5;
    border-radius: 7px;

    font-size: 15px;
    line-height: 1.35;

    box-sizing: border-box;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


/* Наведение */

.tool-card:hover {
    border-color: #ccc;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, .06);

    transform: translateY(-1px);
}


/* ========================================
   Логотип
   ======================================== */

.tool-card img {
    display: block;

    width: 32px;
    height: 32px;

    min-width: 32px;

    object-fit: contain;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
}


/* ========================================
   Название инструмента
   ======================================== */

.tool-card span {
    display: block;

    margin: 0;
    padding: 0;

    font-weight: 500;
}


/* ========================================
   Планшеты
   ======================================== */

@media (max-width: 850px) {

    .tools-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ========================================
   Телефоны
   ======================================== */

@media (max-width: 550px) {

    .about-intro p {
        font-size: 16px;
    }

    .tools-group {
        margin-bottom: 24px !important;
    }

    .tools-group + .tools-group {
        margin-top: 24px !important;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .tool-card {
        min-height: 54px;
    }

}