/*
Theme Name: Smart Kids Theme
Theme URI: https://example.com/smart-kids-theme
Description: Светлая тема для детского развивающего портала: крупный читаемый текст, мягкие цвета, карточки заданий и аккуратные страницы генераторов. Рассчитана на плагин Smart Kids Portal.
Author: Smart Kids Portal
Version: 1.0.0
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smart-kids-theme
*/

/* Всё, чего нет в theme.json. Без внешних шрифтов и картинок. */

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid #f2a900;
	outline-offset: 2px;
	border-radius: 6px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}

/* Шапка */
.sk-header {
	border-bottom: 2px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
	position: relative;
	z-index: 20;
}
.sk-brand { display: flex; align-items: center; gap: 0.6rem; }
.sk-brand svg { flex: none; display: block; }
.sk-header .wp-block-navigation__responsive-container-open,
.sk-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--contrast); }
.sk-header .wp-block-navigation-item__content { padding: 0.4rem 0.2rem; border-radius: 8px; }
.sk-header .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 4px; }
.sk-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.sk-header .wp-block-navigation [aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--wp--preset--color--sun); text-underline-offset: 6px; }

/* Главная: первый экран */
.sk-hero {
	background: linear-gradient(135deg, var(--wp--preset--color--sky-tint) 0%, var(--wp--preset--color--sun-tint) 100%);
	border-radius: 28px;
	overflow: hidden;
}
.sk-eyebrow {
	display: inline-block;
	background: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0.25rem 0.9rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	margin: 0;
}
.sk-hero__art { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 360px; margin-inline: auto; }
.sk-hero__art > div {
	border-radius: 22px;
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	box-shadow: var(--wp--custom--shadow--card);
}
.sk-hero__art svg { width: 62%; height: 62%; }
.sk-hero__art > div:nth-child(2) { transform: translateY(18px); }
.sk-hero__art > div:nth-child(4) { transform: translateY(18px); }

/* Плитки типов заданий */
.sk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .sk-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sk-tiles { grid-template-columns: 1fr; } }
.sk-tile {
	position: relative;
	border-radius: var(--wp--custom--radius--card);
	border: 2px solid rgba(29, 43, 58, 0.08);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sk-tile:hover { transform: translateY(-3px); box-shadow: var(--wp--custom--shadow--card); }
.sk-tile h3 { margin: 0; }
.sk-tile h3 a { text-decoration: none; color: inherit; }
.sk-tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sk-tile p { margin: 0.4rem 0 0; }
.sk-tile__icon { display: block; width: 44px; height: 44px; margin-bottom: 0.7rem; }

/* Шаги */
.sk-step { position: relative; background: var(--wp--preset--color--surface); border: 2px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--card); }
.sk-step__n {
	display: inline-grid; place-items: center;
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--wp--preset--color--sun); color: var(--wp--preset--color--contrast);
	font-weight: 800; margin: 0 0 0.6rem;
}

/* Карточки записей (блог, архивы) */
.sk-card {
	background: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	height: 100%;
	position: relative;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sk-card:hover { transform: translateY(-3px); box-shadow: var(--wp--custom--shadow--card); }
.sk-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sk-card .wp-block-post-terms a { text-decoration: none; background: var(--wp--preset--color--sky-tint); border-radius: 999px; padding: 0.1rem 0.6rem; display: inline-block; }
.sk-card .wp-block-post-terms a:hover { background: var(--wp--preset--color--sun-tint); }

/* Страницы и записи */
.sk-article .wp-block-post-content > * + h2 { margin-top: 2.2rem; }
.sk-article .wp-block-post-content ol, .sk-article .wp-block-post-content ul { padding-left: 1.4rem; }
.sk-article .wp-block-post-content details { margin: 0.6rem 0; }
.sk-article .wp-block-post-content summary { cursor: pointer; font-weight: 700; }
/* Подборка загадок: каждая загадка карточкой с номером, ответ под спойлером */
.sk-article .skp-digest { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: skr; }
.sk-article .skp-digest > li {
	counter-increment: skr;
	position: relative;
	background: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	padding: 1.1rem 1.25rem 1.1rem 3.6rem;
	margin-bottom: 1rem;
}
.sk-article .skp-digest > li::before {
	content: counter(skr);
	position: absolute; left: 1rem; top: 1.1rem;
	width: 1.9rem; height: 1.9rem; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--wp--preset--color--sun); font-weight: 800; font-size: 0.95rem;
}
.sk-article .skp-digest p { margin: 0.35rem 0; }
.sk-article .skp-digest summary { color: var(--wp--preset--color--primary-dark); }

/* Генераторы: страница на всю ширину контейнера, без лишних отступов */
.sk-tool .wp-block-post-content { max-width: none; }

/* Подвал */
.sk-footer { background: var(--wp--preset--color--night); color: #e9eef5; }
.sk-footer a { color: #ffffff; }
.sk-footer .wp-block-navigation-item__content { color: #ffffff; text-decoration: none; padding: 0.15rem 0; }
.sk-footer .wp-block-navigation-item__content:hover { text-decoration: underline; }
.sk-footer h2, .sk-footer h3, .sk-footer h4 { color: #ffffff; }
.sk-footer .sk-muted { color: #b8c4d3; }

.sk-footer-pages, .sk-footer-pages ul { list-style: none; margin: 0; padding: 0; }
.sk-footer-pages { columns: 2 180px; column-gap: 2rem; }
.sk-footer-pages li { break-inside: avoid; }
.sk-footer-pages a { color: #ffffff; text-decoration: none; font-weight: 400; }
.sk-footer-pages a:hover { text-decoration: underline; }

/* Карточки плагина: заголовки-ссылки без подчёркивания */
.skp-card__title a { text-decoration: none; }
.skp-card__title a:hover { text-decoration: underline; }

/* Мелочи */
.sk-muted { color: var(--wp--preset--color--muted); }
.wp-block-search__button { border-radius: var(--wp--custom--radius--button); }
.wp-block-search__input { border: 2px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--button); padding: 0.6rem 0.9rem; background: var(--wp--preset--color--surface); }

@media (max-width: 781px) {
	.sk-hero { border-radius: 22px; }
	.sk-hero__art { max-width: 260px; margin-top: 1rem; }
}
@media (max-width: 560px) {
	.sk-hero__art { display: none; }
}
