/* ATR Home Layout — головна сторінка. Підключається лише разом із mu-plugin atr-home-layout.php. */

.atr-hl {
	--hl-ink: #15171b;
	--hl-text: #3b3f46;
	--hl-muted: #6a6f78;
	--hl-line: #e5e6e9;
	--hl-soft: #f5f6f7;
	--hl-blue: #0a4d8c;
	--hl-yellow: #ebdc14;
	--hl-black: #0b0d10;
	color: var(--hl-text);
	font-size: 16px;
	line-height: 1.55;
}
.atr-hl *, .atr-hl *::before, .atr-hl *::after { box-sizing: border-box; }
.atr-hl a { text-decoration: none; }
.atr-hl ul, .atr-hl dl, .atr-hl dd { margin: 0; padding: 0; list-style: none; }
.atr-hl h1, .atr-hl h2, .atr-hl h3, .atr-hl p { margin: 0; }
.atr-hl h2, .atr-hl h3 { color: var(--hl-ink); }
.atr-hl-wrap { max-width: 1244px; margin: 0 auto; padding: 0 24px; }

/* ---- Кнопки й посилання ---- */
.atr-hl .atr-hl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; transition: filter .15s ease, background-color .15s ease, border-color .15s ease; }
.atr-hl .atr-hl-btn--ghost { flex: 1 1 auto; border: 1px solid var(--hl-line); background: #fff; color: var(--hl-ink); }
.atr-hl .atr-hl-btn--ghost:hover { border-color: var(--hl-ink); color: var(--hl-ink); }
.atr-hl .atr-hl-btn--cta { background: var(--hl-yellow); color: var(--hl-black); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.atr-hl .atr-hl-btn--cta:hover { filter: brightness(.95); color: var(--hl-black); }
.atr-hl .atr-hl-btn--dark { background: var(--hl-black); color: #fff; padding: 14px 24px; white-space: nowrap; }
.atr-hl .atr-hl-btn--dark:hover { filter: brightness(1.5); color: #fff; }
.atr-hl .atr-hl-more { color: var(--hl-blue); font-size: 16px; font-weight: 600; white-space: nowrap; }
.atr-hl .atr-hl-more:hover { text-decoration: underline; }
.atr-hl a:focus-visible { outline: 2px solid var(--hl-blue); outline-offset: 2px; }
.atr-hl-logo { display: block; object-fit: contain; background: #fff; }
.atr-hl-logo--empty { display: flex; align-items: center; justify-content: center; background: var(--hl-soft); color: var(--hl-muted); font-weight: 600; }

/* ---- Hero ---- */
.atr-hl-hero { position: relative; padding: 72px 0 84px; background: linear-gradient(0deg, #191423 0%, #0a0f1e 100%); color: #fff; }
.atr-hl-hero::before { content: ""; position: absolute; inset: 0; background: no-repeat center / cover; opacity: .15; pointer-events: none; }
@media (min-width: 761px) { .atr-hl-hero::before { background-image: url(waves-1600.jpg); } }
@media (max-width: 760px) { .atr-hl-hero::before { background-image: url(waves-800.jpg); } }
.atr-hl-hero .atr-hl-wrap { position: relative; }
.atr-hl .atr-hl-eyebrow { color: var(--hl-yellow); font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.atr-hl-hero h1 { color: #fff; font-size: clamp(40px, 5vw, 68px); font-weight: 600; line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; }
.atr-hl .atr-hl-lead { color: rgba(255, 255, 255, .74); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; margin-top: 18px; max-width: 34em; }

.atr-hl-search { position: relative; z-index: 5; margin-top: 30px; max-width: 620px; }
.atr-hl-search .mfn-live-search-wrapper { position: relative; }
.atr-hl-search .mfn-live-searchform { position: relative; display: flex; align-items: center; height: 62px; margin: 0; padding: 0 20px; background: #fff; border-radius: 12px; }
.atr-hl-search .mfn-live-searchform:focus-within { box-shadow: 0 0 0 3px var(--hl-yellow); }
.atr-hl-search .icon_search { position: static; flex: none; width: 26px; height: 26px; margin: 0; transform: none; }
.atr-hl-search input.field { flex: 1; width: auto; height: 100%; margin: 0; padding: 0 0 0 10px; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--hl-ink); font-size: 18px; }
.atr-hl-search input.field::placeholder { color: var(--hl-muted); }
.atr-hl-search .mfn-live-search-box { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20; margin: 0; padding: 14px 18px 18px; background: #fff; border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); color: var(--hl-ink); }

.atr-hl .atr-hl-stats { display: flex; flex-wrap: wrap; gap: 14px 44px; margin-top: 30px; }
.atr-hl-stats > div { display: flex; flex-direction: column-reverse; }
.atr-hl-stats dd { color: #fff; font-size: 26px; font-weight: 600; line-height: 1.15; }
.atr-hl-stats dt { color: rgba(255, 255, 255, .62); font-size: 14px; font-weight: 400; }

/* ---- Блоки ---- */
.atr-hl-sec { padding: 76px 0; background: #fff; }
.atr-hl-sec--soft { background: var(--hl-soft); }
.atr-hl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.atr-hl-head h2 { font-size: clamp(30px, 3.2vw, 42px); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; }

/* ---- Рубрики ---- */
.atr-hl-cats { display: grid; gap: 18px; }
.atr-hl-cats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.atr-hl-cats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.atr-hl-cat { position: relative; display: flex; flex-direction: column; padding: 22px; background: #fff; border: 1px solid var(--hl-line); border-radius: 16px; transition: border-color .15s ease; }
.atr-hl-cat:hover { border-color: var(--hl-ink); }
.atr-hl-cat__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.atr-hl-cat__count { color: var(--hl-muted); font-size: 15px; font-weight: 500; line-height: 25px; }
.atr-hl-cat h3 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.atr-hl-cat h3 a { color: var(--hl-ink); }
.atr-hl-cat h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.atr-hl-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 16px !important; }
.atr-hl-chips a { display: block; padding: 4px 10px; background: var(--hl-soft); border-radius: 999px; color: var(--hl-text); font-size: 14px; line-height: 1.45; transition: background-color .15s ease; }
.atr-hl-chips a:hover { background: var(--hl-line); color: var(--hl-ink); }
.atr-hl-chips span { color: var(--hl-muted); }

/* ---- Featured ---- */
.atr-hl-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.atr-hl-tool { display: flex; flex-direction: column; padding: 20px; background: #fff; border: 1px solid var(--hl-line); border-radius: 16px; }
.atr-hl-tool__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.atr-hl-tool__top .atr-hl-logo { flex: none; width: 56px; height: 56px; border: 1px solid var(--hl-line); border-radius: 12px; }
.atr-hl-tool__id { min-width: 0; }
.atr-hl-tool h3 { font-size: 18px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.atr-hl-tool h3 a { color: var(--hl-ink); }
.atr-hl-tool h3 a:hover { color: var(--hl-blue); }
.atr-hl .atr-hl-tool__cat { color: var(--hl-muted); font-size: 14px; }
.atr-hl .atr-hl-tool__cat:hover { color: var(--hl-blue); }
.atr-hl-tool__desc { display: -webkit-box; margin-top: 14px !important; overflow: hidden; color: var(--hl-text); font-size: 15px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.atr-hl-tool__actions { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; }

/* ---- New ---- */
.atr-hl-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; border-top: 1px solid var(--hl-line); }
.atr-hl-row { border-bottom: 1px solid var(--hl-line); }
.atr-hl-row a { display: flex; align-items: center; gap: 14px; padding: 15px 0; color: var(--hl-ink); }
.atr-hl-row .atr-hl-logo { flex: none; width: 44px; height: 44px; border: 1px solid var(--hl-line); border-radius: 10px; }
.atr-hl-row__id { flex: 1; min-width: 0; }
.atr-hl-row__id strong { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atr-hl-row__id small { display: block; color: var(--hl-muted); font-size: 14px; line-height: 1.35; }
.atr-hl-row__go { color: var(--hl-muted); transition: transform .15s ease; }
.atr-hl-row a:hover strong { color: var(--hl-blue); }
.atr-hl-row a:hover .atr-hl-row__go { transform: translateX(3px); color: var(--hl-blue); }

/* ---- Блог ---- */
.atr-hl-blog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.atr-hl-post { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hl-line); border-radius: 16px; overflow: hidden; }
.atr-hl-post__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.atr-hl-post__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.atr-hl-post__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; }
.atr-hl-post h3 { font-size: 22px; font-weight: 600; line-height: 1.25; }
.atr-hl-post h3 a { color: var(--hl-ink); }
.atr-hl-post h3 a:hover { color: var(--hl-blue); }
.atr-hl-blog--single { grid-template-columns: minmax(0, 1fr); }
.atr-hl-blog--single .atr-hl-post { flex-direction: row; align-items: stretch; }
.atr-hl-blog--single .atr-hl-post__media { flex: 0 0 50%; aspect-ratio: auto; min-height: 320px; }
.atr-hl-blog--single .atr-hl-post__body { justify-content: center; padding: 40px 48px; }
.atr-hl-blog--single .atr-hl-post h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; }
.atr-hl-blog--single .atr-hl-post p { font-size: 17px; }

/* ---- Add your tool ---- */
.atr-hl-band { padding: 44px 0; background: var(--hl-yellow); color: var(--hl-black); }
.atr-hl-band__row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.atr-hl-band h2 { color: var(--hl-black); font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.15; }
.atr-hl-band p { margin-top: 4px; font-size: 18px; }

/* ---- Адаптив ---- */
@media (max-width: 1100px) {
	.atr-hl-cats--4, .atr-hl-cats--3, .atr-hl-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.atr-hl-rows, .atr-hl-blog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.atr-hl-blog--single { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
	.atr-hl-wrap { padding: 0 16px; }
	.atr-hl-hero { padding: 40px 0 44px; }
	.atr-hl-search .mfn-live-searchform { height: 56px; }
	.atr-hl-stats { gap: 12px 30px; }
	.atr-hl-stats dd { font-size: 22px; }
	.atr-hl-sec { padding: 52px 0; }
	.atr-hl-head { margin-bottom: 22px; }
	.atr-hl-cats--4, .atr-hl-cats--3, .atr-hl-tools, .atr-hl-rows, .atr-hl-blog { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.atr-hl-tool:nth-child(n+5) { display: none; }
	.atr-hl-rows { row-gap: 0; }
	.atr-hl-cat { padding: 18px; }
	.atr-hl-cat h3 { font-size: 19px; }
	.atr-hl-blog--single .atr-hl-post { flex-direction: column; }
	.atr-hl-blog--single .atr-hl-post__media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
	.atr-hl-blog--single .atr-hl-post__body { padding: 22px; }
	.atr-hl-band__row { flex-direction: column; align-items: flex-start; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.atr-hl * { transition: none !important; }
}
