/*
Theme Name: dds_lenagrin.ru
Theme URI: https://lenagrin.ru/
Author: Лена Грин
Description: Тема информационного ресурса о выборе образовательных программ, развитии навыков и построении карьеры. Яркий поп со швейцарской сеткой: бирюзовый и коралловый на белом.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lgrin
*/

/* ---------- Правила для [hidden] ---------- */
.lgrin-cookie[hidden] { display: none !important; }

/* ---------- Токены ---------- */
:root {
    --lg-bg: #FFFFFF;
    --lg-alt: #F0FDFA;
    --lg-mint: #CCFBF1;
    --lg-side: #F8FAFC;
    --lg-ink: #0F172A;
    --lg-teal: #14B8A6;
    --lg-teal-dark: #0D9488;
    --lg-teal-deep: #0F766E;
    --lg-coral: #FB7185;
    --lg-coral-dark: #E11D48;
    --lg-muted: #64748B;
    --lg-line: #E2E8F0;
    --lg-font-head: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --lg-font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --lg-shadow: 0 4px 12px rgba(20, 184, 166, 0.08);
    --lg-shadow-hover: 0 0 0 2px #14B8A6, 0 18px 34px rgba(20, 184, 166, 0.16);
    --lg-radius: 16px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--lg-font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--lg-ink);
    background-color: var(--lg-bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cpath fill='%2314B8A6' fill-opacity='.08' d='M421 64c66 38 128 108 125 186-3 79-71 166-150 214S219 525 151 480 39 352 47 266 112 101 196 60s159-34 225 4z'/%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, rgba(20, 184, 166, 0.03) 0 1px, transparent 1px 28px),
        repeating-linear-gradient(-45deg, rgba(20, 184, 166, 0.03) 0 1px, transparent 1px 28px);
    background-repeat: no-repeat, repeat, repeat;
    background-position: right -180px top -150px, 0 0, 0 0;
    background-size: 680px 680px, auto, auto;
    overflow-x: hidden;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--lg-font-head);
    color: var(--lg-ink);
    line-height: 1.2;
    margin: 1.6em 0 0.6em;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
    hyphens: manual;
}
h1 { font-size: 2.6rem; font-weight: 800; }
h2 { font-size: 1.9rem; font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }
h5, h6 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1.1em; }

a {
    color: var(--lg-teal-dark);
    text-decoration: none;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--lg-coral);
    outline-offset: 2px;
}

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

ul, ol { padding-left: 1.4em; margin: 0 0 1.1em; }
li { margin-bottom: 0.35em; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.4em;
    border: 1px solid #CBD5E1;
    font-size: 0.97rem;
}
th, td {
    border: 1px solid #CBD5E1;
    padding: 0.65rem 0.85rem;
    text-align: left;
    vertical-align: top;
}
th { background: var(--lg-alt); font-weight: 600; }

blockquote {
    margin: 1.5em 0;
    padding: 1.1rem 1.4rem;
    border-left: 5px solid var(--lg-teal);
    background: var(--lg-alt);
    border-radius: 0 12px 12px 0;
}
blockquote p:last-child { margin-bottom: 0; }

pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    background: var(--lg-ink);
    color: #E2E8F0;
    border-radius: 12px;
    font-size: 0.92rem;
}
code { font-size: 0.92em; background: var(--lg-alt); padding: 0.1em 0.35em; border-radius: 6px; }
pre code { background: none; padding: 0; }

hr {
    border: 0;
    height: 1px;
    background: rgba(20, 184, 166, 0.2);
    margin: 2.5rem 0;
}

/* ---------- Служебные ---------- */
.lgrin-sr,
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.lgrin-skip {
    position: absolute;
    left: 1rem;
    top: -60px;
    z-index: 200;
    background: var(--lg-ink);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 8px;
}
.lgrin-skip:focus { top: 1rem; }

.alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption, .wp-block-image figcaption { font-size: 0.88rem; color: var(--lg-muted); }
.wp-caption { max-width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.8rem; }
.sticky, .bypostauthor { position: relative; }

/* ---------- Контейнер ---------- */
.lgrin-shell {
    width: min(92%, 1280px);
    margin-inline: auto;
}

/* ---------- Шапка ---------- */
.lgrin-topline {
    height: 4px;
    background: linear-gradient(90deg, #14B8A6 0%, #FB7185 100%);
}

.lgrin-header {
    background: #FFFFFF;
    border-bottom: 1px solid #14B8A6;
}
.lgrin-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.lgrin-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--lg-ink);
    min-width: 0;
    flex: 1 1 auto;
}
.lgrin-brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.lgrin-logo-img { display: block; max-height: 56px; width: auto; }
.lgrin-logo-svg { display: block; }
.lgrin-brand-text { display: flex; flex-direction: column; min-width: 0; max-width: 560px; }
.lgrin-brand-name {
    font-family: var(--lg-font-head);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
}
.lgrin-brand-desc {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--lg-muted);
    margin-top: 0.15rem;
}

.lgrin-nav { flex: 0 0 auto; }
.lgrin-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.lgrin-menu li { margin: 0; position: relative; }
.lgrin-menu a {
    display: block;
    padding: 0.55rem 0.9rem;
    font-family: var(--lg-font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--lg-ink);
    border-radius: 10px;
    transition: background-color 0.2s, color 0.2s;
}
.lgrin-menu a:hover { background: var(--lg-alt); color: var(--lg-teal-deep); }
.lgrin-menu .current-menu-item > a,
.lgrin-menu .current_page_item > a {
    background: var(--lg-teal);
    color: #FFFFFF;
}
.lgrin-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    display: none;
    z-index: 30;
}
.lgrin-menu li:hover > .sub-menu,
.lgrin-menu li:focus-within > .sub-menu { display: block; }

.lgrin-nav-toggle {
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    border: 2px solid var(--lg-teal);
    border-radius: 12px;
    background: #fff;
    color: var(--lg-ink);
    font: 600 0.95rem/1 var(--lg-font-head);
    cursor: pointer;
}
.lgrin-nav-bars { display: flex; flex-direction: column; gap: 4px; }
.lgrin-nav-bars span { display: block; width: 18px; height: 2px; background: var(--lg-ink); border-radius: 2px; }

/* ---------- Кнопки ---------- */
.lgrin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    border: 2px solid transparent;
    font: 600 1rem/1.25 var(--lg-font-head);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.lgrin-btn-primary {
    background: #14B8A6;
    border-color: #14B8A6;
    color: #FFFFFF;
}
.lgrin-btn-primary:hover {
    background: #0D9488;
    border-color: #0D9488;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -8px rgba(20, 184, 166, 0.65);
}
.lgrin-btn-ghost {
    background: transparent;
    border-color: #FB7185;
    color: #E11D48;
}
.lgrin-btn-ghost:hover {
    border-color: #E11D48;
    color: #BE123C;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -8px rgba(251, 113, 133, 0.6);
}

/* ---------- Ссылки с анимированным подчёркиванием ---------- */
.lgrin-entry a,
.lgrin-more,
.lgrin-crumbs a,
.lgrin-page-lead a,
.lgrin-sidebar .lgrin-widget a,
.lgrin-comment-text a {
    color: #0D9488;
    background-image: linear-gradient(#14B8A6, #14B8A6), linear-gradient(rgba(20, 184, 166, 0.28), rgba(20, 184, 166, 0.28));
    background-repeat: no-repeat;
    background-position: 0 100%, 0 100%;
    background-size: 0 2px, 100% 1px;
    transition: background-size 0.3s ease, color 0.2s ease;
    padding-bottom: 1px;
}
.lgrin-entry a:hover,
.lgrin-more:hover,
.lgrin-crumbs a:hover,
.lgrin-page-lead a:hover,
.lgrin-sidebar .lgrin-widget a:hover,
.lgrin-comment-text a:hover {
    color: #0F766E;
    background-size: 100% 2px, 100% 1px;
}

/* ---------- Заголовки секций ---------- */
.lgrin-title {
    position: relative;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.18;
    margin: 0 0 1.6rem -0.4rem;
    padding-left: 1.25rem;
    letter-spacing: -0.02em;
}
.lgrin-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #14B8A6;
}
.lgrin-title--coral::before { background: #FB7185; }

.lgrin-mark {
    background-image: linear-gradient(transparent 56%, rgba(20, 184, 166, 0.34) 56%, rgba(20, 184, 166, 0.34) 94%, transparent 94%);
    padding: 0 0.18em;
    margin-left: -0.12em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.lgrin-mark--coral {
    background-image: linear-gradient(transparent 56%, rgba(251, 113, 133, 0.38) 56%, rgba(251, 113, 133, 0.38) 94%, transparent 94%);
}

.lgrin-section-lead {
    max-width: 62ch;
    color: var(--lg-muted);
    font-size: 1.08rem;
    margin: -0.6rem 0 2.2rem;
}

/* ---------- Главная ---------- */
.lgrin-front {
    width: 85%;
    margin: 0 auto;
    padding: 40px 0 80px;
}

@keyframes lgrin-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.lgrin-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 24px;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #F0FDFA, #CCFBF1);
    box-shadow: var(--lg-shadow);
}
.lgrin-hero-art {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    display: block;
    z-index: -2;
}
.lgrin-hero::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 46%, rgba(255, 255, 255, 0) 70%);
}
.lgrin-hero-inner {
    width: 60%;
    padding: 72px 64px;
    min-width: 0;
    animation: lgrin-rise 0.7s ease-out both;
}
.lgrin-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.07;
    letter-spacing: -0.03em;
    margin: 0 0 1.3rem;
}
.lgrin-hero-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #334155;
    max-width: 52ch;
    margin: 0 0 2rem;
}
.lgrin-hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.lgrin-stats {
    margin-top: 80px;
    padding: 64px 56px;
    border-radius: 24px;
    background-color: #F0FDFA;
    background-image:
        repeating-linear-gradient(45deg, rgba(20, 184, 166, 0.06) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(-45deg, rgba(20, 184, 166, 0.06) 0 1px, transparent 1px 22px);
}
.lgrin-stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}
.lgrin-stat { margin: 0; min-width: 0; }
.lgrin-stat-num {
    display: inline-block;
    position: relative;
    font-family: var(--lg-font-head);
    font-weight: 800;
    font-size: clamp(2.6rem, 4.4vw, 3.6rem);
    line-height: 1;
    color: #14B8A6;
    letter-spacing: -0.03em;
    padding-bottom: 0.9rem;
    margin-bottom: 0.9rem;
}
.lgrin-stat-num::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 5px;
    border-radius: 3px;
    background: #FB7185;
}
.lgrin-stat-label {
    display: block;
    color: var(--lg-muted);
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 24ch;
}

.lgrin-dotband {
    height: 64px;
    margin: 56px 0 0;
    background-image: radial-gradient(circle, rgba(20, 184, 166, 0.55) 1.6px, transparent 1.9px);
    background-size: 14px 14px;
    clip-path: polygon(0 72%, 100% 0, 100% 28%, 0 100%);
}

.lgrin-latest { padding: 56px 0 80px; }
.lgrin-latest-more { margin: 2.2rem 0 0; }

.lgrin-areas {
    padding: 80px 0;
    border-top: 1px solid rgba(20, 184, 166, 0.2);
}
.lgrin-areas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}
.lgrin-area {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2rem 1.8rem;
    box-shadow: var(--lg-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-width: 0;
}
.lgrin-area:hover {
    transform: translateY(-4px);
    box-shadow: var(--lg-shadow-hover);
}
.lgrin-area-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #14B8A6;
    margin-bottom: 1.2rem;
}
.lgrin-area:nth-child(even) .lgrin-area-icon { background: #FB7185; }
.lgrin-area-icon svg {
    display: block;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lgrin-area-title { font-size: 1.2rem; margin: 0 0 0.6rem; }
.lgrin-area p { color: var(--lg-muted); margin: 0; font-size: 0.98rem; }

.lgrin-quote-section { padding-top: 0; }
.lgrin-quote {
    position: relative;
    margin: 0;
    padding: 80px 72px;
    border-radius: 24px;
    background-color: #0F172A;
    background-image: radial-gradient(circle, rgba(20, 184, 166, 0.35) 1.5px, transparent 1.8px);
    background-size: 16px 16px;
    background-position: right -4px top -4px;
    background-repeat: repeat;
    overflow: hidden;
}
.lgrin-quote::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(105deg, #0F172A 55%, rgba(15, 23, 42, 0.6) 100%);
}
.lgrin-quote blockquote {
    position: relative;
    margin: 0;
    padding: 0.2rem 0 0.2rem 2rem;
    border-left: 6px solid #14B8A6;
    border-radius: 0;
    background: none;
}
.lgrin-quote blockquote p {
    font-family: var(--lg-font-head);
    font-weight: 700;
    font-size: clamp(1.5rem, 2.8vw, 2.3rem);
    line-height: 1.32;
    letter-spacing: -0.015em;
    color: #FFFFFF;
    max-width: 34ch;
    margin: 0;
}
.lgrin-quote em {
    font-style: normal;
    color: #2DD4BF;
}
.lgrin-quote figcaption {
    position: relative;
    margin: 2rem 0 0 calc(2rem + 6px);
    font-family: var(--lg-font-head);
    font-weight: 600;
    font-size: 1.05rem;
    color: #FB7185;
}

/* ---------- Карточки записей ---------- */
.lgrin-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}
.lgrin-layout-side .lgrin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.lgrin-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--lg-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.lgrin-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lg-shadow-hover);
}
.lgrin-card-thumb { display: block; }
.lgrin-card-thumb img,
.lgrin-card-fallback {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.lgrin-card-fallback {
    background-color: #CCFBF1;
    background-image:
        radial-gradient(circle at 78% 30%, #14B8A6 0 18%, transparent 18.5%),
        radial-gradient(circle at 30% 90%, #FB7185 0 14%, transparent 14.5%),
        radial-gradient(circle, rgba(15, 118, 110, 0.25) 1.4px, transparent 1.7px);
    background-size: 100% 100%, 100% 100%, 14px 14px;
}
.lgrin-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.35rem 1.45rem 1.45rem;
    min-width: 0;
}
.lgrin-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}
.lgrin-card-tags:empty { display: none; }
.lgrin-card-title {
    font-size: 1.18rem;
    line-height: 1.3;
    margin: 0 0 0.7rem;
}
.lgrin-card-title a { color: var(--lg-ink); transition: color 0.2s; }
.lgrin-card-title a:hover { color: var(--lg-teal-deep); }
.lgrin-card-excerpt {
    flex: 1;
    color: #475569;
    font-size: 0.97rem;
    line-height: 1.6;
}
.lgrin-card-excerpt p { margin: 0 0 0.5em; background: none; }
.lgrin-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--lg-line);
    font-size: 0.9rem;
}
.lgrin-card-foot time { color: var(--lg-muted); }
.lgrin-more { font-family: var(--lg-font-head); font-weight: 600; }

.lgrin-tag,
.lgrin-pin {
    display: inline-block;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-family: var(--lg-font-head);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}
.lgrin-tone-1 { background: rgba(20, 184, 166, 0.14); color: #0F766E; }
.lgrin-tone-2 { background: rgba(251, 113, 133, 0.16); color: #BE123C; }
.lgrin-tone-3 { background: #D1FAE5; color: #047857; }
.lgrin-tone-4 { background: #EDE9FE; color: #6D28D9; }
.lgrin-tag:hover { filter: brightness(0.95); }
.lgrin-pin { background: #FB7185; color: #FFFFFF; }

.lgrin-empty { color: var(--lg-muted); font-size: 1.05rem; }

/* ---------- Внутренние страницы ---------- */
.lgrin-inner { padding: 0 0 80px; }

.lgrin-crumbs {
    padding: 1.6rem 0 1.4rem;
    font-size: 0.9rem;
    color: var(--lg-muted);
}
.lgrin-crumb-sep { margin: 0 0.35rem; color: #FB7185; }

.lgrin-layout-single .lgrin-content {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.lgrin-layout-side {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.lgrin-layout-side .lgrin-content { flex: 0 0 67%; min-width: 0; }
.lgrin-layout-side .lgrin-sidebar { flex: 0 0 27%; min-width: 0; }

.lgrin-page-head { margin-bottom: 2.2rem; }
.lgrin-page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 0.9rem;
}
.lgrin-page-lead { color: var(--lg-muted); font-size: 1.1rem; max-width: 62ch; margin: 0; }

.lgrin-article-head { margin-bottom: 1.6rem; }
.lgrin-article-meta { color: var(--lg-muted); font-size: 0.92rem; margin: 0; }
.lgrin-article-thumb { margin: 0 0 2rem; border-radius: 16px; overflow: hidden; }
.lgrin-article-thumb img { display: block; width: 100%; height: auto; }

.lgrin-entry { font-size: 1.07rem; line-height: 1.75; }
.lgrin-entry > *:first-child { margin-top: 0; }
.lgrin-entry h2 { font-size: 1.75rem; }
.lgrin-entry h3 { font-size: 1.35rem; }
.lgrin-entry img { border-radius: 12px; }
.lgrin-entry ul li::marker { color: #14B8A6; }
.lgrin-entry ol li::marker { color: #FB7185; font-weight: 700; }
.lgrin-entry::after { content: ""; display: table; clear: both; }

.lgrin-page-links { margin: 1.5rem 0; font-weight: 600; }

.lgrin-article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(20, 184, 166, 0.2);
}
.lgrin-article-tags-label { font-weight: 600; margin-right: 0.3rem; }

.lgrin-postnav { margin-top: 2.5rem; }
.lgrin-postnav .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.lgrin-postnav .nav-next { grid-column: 2; text-align: right; }
.lgrin-postnav a {
    display: block;
    height: 100%;
    padding: 1.1rem 1.3rem;
    border-radius: 16px;
    background: #F0FDFA;
    color: var(--lg-ink);
    transition: transform 0.2s, box-shadow 0.2s;
}
.lgrin-postnav a:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #14B8A6; }
.lgrin-postnav-label { display: block; font-size: 0.82rem; color: var(--lg-muted); margin-bottom: 0.25rem; }
.lgrin-postnav-title { display: block; font-family: var(--lg-font-head); font-weight: 700; }

/* ---------- Сайдбар ---------- */
.lgrin-sidebar {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 1.8rem 1.6rem;
    color: #0F172A;
    border: 1px solid #E2E8F0;
}
.lgrin-sidebar .lgrin-widget + .lgrin-widget { margin-top: 2rem; }
.lgrin-sidebar .lgrin-widget-title {
    position: relative;
    margin: 0 0 1rem;
    padding-left: 1rem;
    font-size: 1.1rem;
    color: #0F172A;
}
.lgrin-sidebar .lgrin-widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FB7185;
}
.lgrin-sidebar .lgrin-widget ul { list-style: none; margin: 0; padding: 0; }
.lgrin-sidebar .lgrin-widget li {
    position: relative;
    padding: 0.55rem 0 0.55rem 1rem;
    margin: 0;
    border-bottom: 1px solid #E2E8F0;
    color: #334155;
    font-size: 0.97rem;
}
.lgrin-sidebar .lgrin-widget li:last-child { border-bottom: 0; }
.lgrin-sidebar .lgrin-widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.15em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #14B8A6;
}
.lgrin-sidebar .lgrin-widget a { color: #0F172A; background-image: linear-gradient(#14B8A6, #14B8A6), linear-gradient(transparent, transparent); }
.lgrin-sidebar .lgrin-widget a:hover { color: #0F766E; }
.lgrin-sidebar .post-date { display: block; color: #64748B; font-size: 0.82rem; }
.lgrin-sidebar p { color: #334155; }

/* ---------- Пагинация ---------- */
.lgrin-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}
.lgrin-pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 0.95rem;
    border-radius: 12px;
    border: 2px solid #CCFBF1;
    background: #FFFFFF;
    color: #0F172A;
    font-family: var(--lg-font-head);
    font-weight: 600;
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.lgrin-pager a.page-numbers:hover {
    border-color: #14B8A6;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -8px rgba(20, 184, 166, 0.55);
}
.lgrin-pager .page-numbers.current {
    background: #14B8A6;
    border-color: #14B8A6;
    color: #FFFFFF;
}
.lgrin-pager .page-numbers.dots {
    border: 0;
    background: none;
    min-width: auto;
    padding: 0 0.3rem;
    color: var(--lg-muted);
}

/* ---------- Поиск ---------- */
.lgrin-search {
    display: flex;
    gap: 0.6rem;
    margin: 1.2rem 0;
    max-width: 560px;
}
.lgrin-search-field {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 1rem;
    border: 2px solid #CCFBF1;
    border-radius: 12px;
    font: inherit;
    font-size: 1rem;
    color: var(--lg-ink);
    background: #fff;
}
.lgrin-search-field:focus { border-color: #14B8A6; outline: none; }
.lgrin-search-btn { flex: 0 0 auto; }

/* ---------- 404 ---------- */
.lgrin-404 { padding: 1rem 0 2rem; }
.lgrin-404-code {
    font-family: var(--lg-font-head);
    font-weight: 800;
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    margin: 0 0 0.5rem;
    color: transparent;
    -webkit-text-stroke: 3px #14B8A6;
}
.lgrin-404-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- Комментарии ---------- */
.lgrin-comments {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(20, 184, 166, 0.2);
}
.lgrin-comments .lgrin-title { font-size: 1.6rem; }
.lgrin-comment-list,
.lgrin-comment-list .children { list-style: none; margin: 0; padding: 0; }
.lgrin-comment-list .children { padding-left: 2rem; }
.lgrin-comment { margin: 0 0 1.2rem; }
.lgrin-comment-body {
    padding: 1.2rem 1.4rem;
    background: #F8FAFC;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
}
.lgrin-comment-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
.lgrin-comment-avatar { border-radius: 50%; display: block; }
.lgrin-comment-meta { display: flex; flex-direction: column; }
.lgrin-comment-author { font-family: var(--lg-font-head); font-weight: 700; }
.lgrin-comment-meta time { font-size: 0.82rem; color: var(--lg-muted); }
.lgrin-comment-wait { color: #BE123C; font-size: 0.9rem; }
.lgrin-comment-text p:last-child { margin-bottom: 0; }
.lgrin-comment-reply { margin-top: 0.6rem; }
.lgrin-comment-reply a { font-family: var(--lg-font-head); font-weight: 600; font-size: 0.9rem; color: #E11D48; }
.lgrin-comments-closed { color: var(--lg-muted); }
.lgrin-comments .comment-navigation .nav-links { display: flex; justify-content: space-between; margin: 1rem 0; }

.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-size: 1.4rem; margin: 0 0 1rem; }
.comment-reply-title small { margin-left: 0.6rem; font-size: 0.85rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 0.95rem;
    border: 2px solid #CCFBF1;
    border-radius: 12px;
    font: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--lg-ink);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: #14B8A6; outline: none; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.5rem; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; margin: 0; }
.comment-notes, .logged-in-as { color: var(--lg-muted); font-size: 0.92rem; }
.required { color: #E11D48; }

/* ---------- Подвал ---------- */
.lgrin-footer {
    position: relative;
    background: #0F172A;
    color: #CBD5E1;
    padding: 72px 0 32px;
}
.lgrin-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #14B8A6 0%, #FB7185 100%);
}
.lgrin-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
}
.lgrin-footer-col { min-width: 0; }
.lgrin-footer .lgrin-widget { color: #CBD5E1; font-size: 0.97rem; }
.lgrin-footer .lgrin-widget + .lgrin-widget { margin-top: 1.8rem; }
.lgrin-footer .lgrin-widget-title {
    position: relative;
    color: #FFFFFF;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-left: 1rem;
}
.lgrin-footer .lgrin-widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #14B8A6;
}
.lgrin-footer-col:nth-child(2) .lgrin-widget-title::before { background: #FB7185; }
.lgrin-footer .lgrin-widget p { color: #CBD5E1; }
.lgrin-footer .lgrin-widget ul { list-style: none; margin: 0; padding: 0; }
.lgrin-footer .lgrin-widget li { margin: 0 0 0.55rem; color: #CBD5E1; }
.lgrin-footer .lgrin-widget a {
    color: #5EEAD4;
    background-image: linear-gradient(#FB7185, #FB7185);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.3s ease, color 0.2s ease;
    padding-bottom: 1px;
}
.lgrin-footer .lgrin-widget a:hover { color: #FFFFFF; background-size: 100% 2px; }
.lgrin-footer .post-date { color: #94A3B8; }
.lgrin-copy {
    margin: 3rem 0 0;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(203, 213, 225, 0.16);
    color: #94A3B8;
    font-size: 0.9rem;
}

/* ---------- Cookie-баннер ---------- */
.lgrin-cookie {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-inline: auto;
    max-width: 920px;
    padding: 1.1rem 1.4rem;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 0 0 2px #14B8A6, 0 18px 40px rgba(15, 23, 42, 0.18);
}
.lgrin-cookie-text { margin: 0; font-size: 0.93rem; color: #334155; min-width: 0; }
.lgrin-cookie .lgrin-btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .lgrin-header-row { flex-wrap: wrap; }
    .lgrin-nav-toggle { display: inline-flex; }
    .lgrin-nav {
        display: none;
        flex: 0 0 100%;
        order: 3;
    }
    .lgrin-nav.is-open { display: block; }
    .lgrin-menu {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.6rem 0 0.4rem;
        border-top: 1px solid #E2E8F0;
    }
    .lgrin-menu .sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        padding: 0 0 0 1rem;
        min-width: 0;
    }

    .lgrin-front { width: 100%; }
    .lgrin-hero { min-height: 480px; }
    .lgrin-hero-inner { width: 75%; padding: 56px 44px; }
    .lgrin-hero-title { font-size: 2.8rem; }
    .lgrin-hero::after { background: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.86) 60%, rgba(255, 255, 255, 0.2) 100%); }

    .lgrin-stats { padding: 52px 40px; }
    .lgrin-stats-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lgrin-cards,
    .lgrin-areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lgrin-quote { padding: 60px 44px; }

    .lgrin-layout-single .lgrin-content { width: 100%; }
    .lgrin-layout-side { display: block; }
    .lgrin-layout-side .lgrin-sidebar { margin-top: 3rem; }

    .lgrin-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .lgrin-brand-desc { display: none; }
    .lgrin-brand-name { font-size: 0.88rem; }
    .lgrin-logo-svg { width: 44px; height: 44px; }

    .lgrin-front { padding-top: 24px; }
    .lgrin-hero { min-height: 0; border-radius: 18px; }
    .lgrin-hero-inner { width: auto; padding: 44px 24px; }
    .lgrin-hero-title { font-size: 2.15rem; }
    .lgrin-hero-lead { font-size: 1.02rem; }
    .lgrin-hero::after { background: rgba(255, 255, 255, 0.86); }
    .lgrin-hero-actions .lgrin-btn { flex: 1 1 100%; }

    .lgrin-stats { margin-top: 56px; padding: 40px 24px; border-radius: 18px; }
    .lgrin-stats-list { gap: 1.6rem 1.2rem; }
    .lgrin-latest { padding: 40px 0 56px; }
    .lgrin-areas { padding: 56px 0; }
    .lgrin-cards,
    .lgrin-layout-side .lgrin-cards,
    .lgrin-areas-grid { grid-template-columns: minmax(0, 1fr); }
    .lgrin-area { padding: 1.6rem 1.4rem; }
    .lgrin-quote { padding: 44px 24px; border-radius: 18px; }
    .lgrin-quote blockquote { padding-left: 1.2rem; }
    .lgrin-quote figcaption { margin-left: calc(1.2rem + 6px); }

    .lgrin-title { margin-left: 0; }
    .lgrin-postnav .nav-links { grid-template-columns: minmax(0, 1fr); }
    .lgrin-postnav .nav-next { grid-column: auto; }
    .lgrin-sidebar { padding: 1.5rem 1.3rem; }
    .lgrin-comment-list .children { padding-left: 1rem; }
    .lgrin-search { flex-wrap: wrap; }
    .lgrin-search-btn { flex: 1 1 100%; }

    .lgrin-footer-grid { grid-template-columns: minmax(0, 1fr); }
    .lgrin-cookie { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; }
    .alignleft, .alignright { float: none; margin: 0 0 1em; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
