/*
Theme Name: Правовой стандарт
Theme URI: https://example.ru
Author: Правовой стандарт
Description: Кастомная тема для сайта юридической фирмы: главная, услуги (записи типа «Услуги»), новости, контакты, о компании.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lawfirm
*/

:root {
    --c-dark: #142438;
    --c-primary: #1d3a5f;
    --c-primary-light: #2a4f7d;
    --c-accent: #c19a3f;
    --c-accent-dark: #a98636;
    --c-accent-soft: #f7efdd;
    --c-bg: #f5f7fa;
    --c-text: #2a3542;
    --c-muted: #667383;
    --c-border: #e3e8ee;
    --c-white: #ffffff;
    --shadow-card: 0 2px 10px rgba(20, 36, 56, 0.06);
    --shadow-card-hover: 0 10px 28px rgba(20, 36, 56, 0.14);
    --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-white);
}

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

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent-dark); }

h1, h2, h3, h4, h5 {
    font-family: inherit;
    color: var(--c-dark);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

.section { padding: 68px 0; }
.section--gray { background: var(--c-bg); }

.section-head {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}
.section-head p { color: var(--c-muted); margin: 0; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:active { transform: translateY(1px); }

.btn--accent {
    background: var(--c-accent);
    color: var(--c-dark);
}
.btn--accent:hover {
    background: var(--c-accent-dark);
    color: var(--c-dark);
}

.btn--primary {
    background: var(--c-primary);
    color: var(--c-white);
}
.btn--primary:hover { background: var(--c-primary-light); color: var(--c-white); }

.btn--outline {
    background: transparent;
    color: var(--c-white);
    border-color: rgba(255, 255, 255, 0.55);
}
.btn--outline:hover { border-color: var(--c-white); color: var(--c-white); }

/* ---------- Topbar ---------- */

.topbar {
    background: var(--c-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}
.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 7px 20px;
    max-width: 1160px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.topbar a { color: var(--c-white); font-weight: 600; }
.topbar a:hover { color: var(--c-accent); }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Header ---------- */

.site-header {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 20px;
    max-width: 1160px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--c-dark);
}
.brand__logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    background: var(--c-primary);
    border-radius: 10px;
}
.brand__logo svg { width: 26px; height: 26px; }
.brand__name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.15;
}
.brand__desc {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--c-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-menu > li { position: relative; }
.nav-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--c-dark);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_parent > a { color: var(--c-primary); background: rgba(29, 58, 95, 0.07); }

.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    box-shadow: var(--shadow-card-hover);
    list-style: none;
    margin: 0;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}
.nav-menu .sub-menu a { padding: 9px 12px; border-radius: 7px; font-weight: 500; }

.header-cta { white-space: nowrap; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--c-dark);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
    background:
        linear-gradient(135deg, rgba(20, 36, 56, 0.96), rgba(29, 58, 95, 0.93)),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 18px);
    color: var(--c-white);
    padding: 88px 0;
}
.hero__inner { max-width: 720px; }
.hero h1 {
    color: var(--c-white);
    font-size: 2.5rem;
    margin-bottom: 0.45em;
}
.hero__lead {
    font-size: 1.12rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.6em;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 56px;
    padding-top: 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero__stat b {
    display: block;
    font-size: 1.7rem;
    color: var(--c-accent);
}
.hero__stat span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

/* ---------- Cards / grids ---------- */

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 26px;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: rgba(193, 154, 63, 0.5);
}

.card__icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--c-accent-soft);
    color: var(--c-accent-dark);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 18px;
    flex: 0 0 54px;
}
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--c-muted); font-size: 0.93rem; flex-grow: 1; }
.card__price {
    margin-top: 14px;
    font-weight: 700;
    color: var(--c-primary);
    font-size: 0.95rem;
}
.card .link-more {
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---------- Steps ---------- */

.steps { counter-reset: step; }
.step {
    counter-increment: step;
    position: relative;
    padding-top: 68px;
}
.step::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--c-primary);
    color: var(--c-white);
    font-weight: 800;
    font-size: 1.2rem;
    display: grid;
    place-items: center;
}
.step h3 { margin-bottom: 0.4em; }
.step p { color: var(--c-muted); margin: 0; font-size: 0.95rem; }

/* ---------- About teaser ---------- */

.about-teaser { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.about-teaser__list { list-style: none; margin: 0; padding: 0; }
.about-teaser__list li {
    position: relative;
    padding: 0 0 14px 34px;
    font-weight: 500;
}
.about-teaser__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--c-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a98636' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.about-teaser__panel {
    background: var(--c-primary);
    border-radius: var(--radius);
    padding: 36px;
    color: var(--c-white);
}
.about-teaser__panel h3 { color: var(--c-white); }
.about-teaser__panel p { color: rgba(255, 255, 255, 0.85); }
.about-teaser__panel .btn { margin-top: 8px; }

/* ---------- CTA band ---------- */

.cta-band {
    background:
        linear-gradient(120deg, rgba(20, 36, 56, 0.97), rgba(42, 79, 125, 0.95)),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 18px);
    color: var(--c-white);
    padding: 60px 0;
}
.cta-band__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
}
.cta-band h2 { color: var(--c-white); margin-bottom: 0.3em; }
.cta-band p { color: rgba(255, 255, 255, 0.8); margin: 0; }

/* ---------- News cards ---------- */

.news-card { padding: 0; overflow: hidden; }
.news-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.news-card__meta {
    font-size: 0.8rem;
    color: var(--c-muted);
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.news-card h3 { font-size: 1.08rem; }
.news-card p { font-size: 0.92rem; }

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
    background:
        linear-gradient(135deg, rgba(20, 36, 56, 0.96), rgba(29, 58, 95, 0.93)),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 18px);
    color: var(--c-white);
    padding: 52px 0;
}
.page-hero h1 { color: var(--c-white); margin: 0; }
.page-hero .breadcrumbs { margin-top: 10px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.65); }
.page-hero .breadcrumbs a { color: rgba(255, 255, 255, 0.85); }
.page-hero .breadcrumbs a:hover { color: var(--c-accent); }

/* ---------- Filters ---------- */

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 36px;
}
.filter-tabs a {
    padding: 9px 22px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-white);
    color: var(--c-text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.filter-tabs a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-tabs a.is-active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: var(--c-white);
}

/* ---------- Single service / post ---------- */

.entry-content { font-size: 1.02rem; }
.entry-content h2 { margin-top: 1.4em; }
.entry-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--c-muted);
    font-size: 0.88rem;
    margin-bottom: 24px;
}
.entry-meta .price-tag {
    background: var(--c-accent-soft);
    color: var(--c-accent-dark);
    padding: 3px 12px;
    border-radius: 999px;
    font-weight: 700;
}

.service-cta {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-left: 4px solid var(--c-accent);
    border-radius: var(--radius);
    padding: 26px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 36px 0;
}
.service-cta h3 { margin: 0 0 4px; }
.service-cta p { margin: 0; color: var(--c-muted); }

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.post-nav a {
    flex: 1 1 240px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 0.9rem;
}
.post-nav a:hover { border-color: var(--c-primary); }
.post-nav .next { text-align: right; }

/* ---------- Contacts ---------- */

.contact-cards { margin-bottom: 48px; }
.contact-card {
    text-align: center;
    align-items: center;
}
.contact-card__icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--c-accent-soft);
    display: grid;
    place-items: center;
}
.contact-card h3 { font-size: 1.05rem; }
.contact-card p { font-size: 0.95rem; }
.contact-card a { font-weight: 700; color: var(--c-primary); font-size: 1.05rem; }

/* ---------- Карта проезда (Leaflet) ---------- */

.contact-map__title { margin-bottom: 16px; }
.contact-map {
    height: 440px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-bg);
    font: inherit;
    z-index: 0; /* панели Leaflet не должны перекрывать шапку */
}
.contact-map__note {
    margin-top: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--c-muted);
}

/* Метка дома */
.house-marker { background: none; border: 0; }

/* Стрелка на вход: кончик смотрит на северо-запад и приходится на координату входа */
.entrance-marker {
    background: none;
    border: 0;
}
.entrance-marker__label {
    position: absolute;
    right: 8px;
    bottom: 4px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--c-primary);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(20, 36, 56, 0.18);
}
.entrance-marker__arrow {
    position: absolute;
    left: 15px;  /* кончик (13,29) svg попадает в точку (28,30) = iconAnchor */
    top: 1px;
    transform: rotate(135deg); /* стрелка вниз + 135° по часовой = северо-запад */
    transform-origin: 13px 29px; /* кончик стрелки */
    filter: drop-shadow(0 1px 2px rgba(20, 36, 56, 0.35));
}

/* ---------- QR-код для оплаты ---------- */

.qr-payment {
    margin: 28px 0 8px;
    text-align: center;
}
.qr-payment img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 10px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}
.qr-payment figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--c-muted);
}

/* ---------- Team ---------- */

.team-card { text-align: center; align-items: center; }
.team-card__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
    color: var(--c-white);
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}
.team-card h3 { font-size: 1.08rem; margin-bottom: 2px; }
.team-card .team-card__role { color: var(--c-accent-dark); font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; }
.team-card p { font-size: 0.88rem; }
.team-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ---------- Благодарности (карусель сканов) ---------- */

.gratitudes__wrap { position: relative; }
.gratitudes__track {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.gratitudes__track::-webkit-scrollbar { display: none; }
.gratitudes__item {
    flex: 0 0 auto;
    width: 240px;
    scroll-snap-align: start;
}
.gratitudes__link {
    display: block;
    padding: 10px 10px 12px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    cursor: zoom-in;
}
.gratitudes__link:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: rgba(193, 154, 63, 0.5);
}
.gratitudes__link img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    background: var(--c-bg);
}
.gratitudes__caption {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--c-muted);
    text-align: center;
}
.gratitudes__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid var(--c-border);
    border-radius: 50%;
    background: var(--c-white);
    color: var(--c-primary);
    font-size: 1.1rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    z-index: 2;
    transition: background 0.2s, color 0.2s;
}
.gratitudes__nav:hover:not(:disabled) { background: var(--c-primary); color: var(--c-white); }
.gratitudes__nav:disabled { opacity: 0.35; cursor: default; }
.gratitudes__nav--prev { left: -20px; }
.gratitudes__nav--next { right: -20px; }

/* ---------- Лайтбокс (увеличенный просмотр документа) ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(20, 36, 56, 0.9);
    z-index: 1000;
}
.lightbox.is-open { display: grid; }
.lightbox__figure {
    margin: 0;
    max-width: min(1000px, 92vw);
    text-align: center;
}
.lightbox__img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    background: var(--c-white);
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.lightbox__caption {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}
.lightbox__nav,
.lightbox__close {
    position: absolute;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--c-white);
    font-size: 1.15rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s;
}
.lightbox__nav:hover,
.lightbox__close:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
.lightbox__close { top: 20px; right: 20px; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--c-dark);
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0;
    font-size: 0.9rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: var(--c-accent); }

.footer-cols {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding: 56px 0 40px;
}
.footer-cols h4 {
    color: var(--c-white);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 18px;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 10px; }
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--c-white);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 14px;
}
.footer-brand svg { width: 26px; height: 26px; }
.footer-contact li { display: flex; gap: 8px; align-items: baseline; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 0;
    font-size: 0.82rem;
}
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Pagination / posts navigation ---------- */

.pagination, .navigation.posts-navigation {
    margin-top: 44px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination .page-numbers,
.navigation.posts-navigation a {
    display: inline-block;
    min-width: 42px;
    padding: 9px 14px;
    text-align: center;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: var(--c-white);
    color: var(--c-text);
    font-weight: 600;
    font-size: 0.9rem;
}
.pagination .page-numbers.current {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: var(--c-white);
}
.pagination .page-numbers:hover:not(.current) { border-color: var(--c-primary); color: var(--c-primary); }

/* ---------- Misc ---------- */

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--c-primary);
    color: #fff;
    padding: 10px 18px;
    z-index: 200;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

.sticky-post-flag {
    display: inline-block;
    background: var(--c-accent);
    color: var(--c-dark);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.search-form { display: flex; gap: 10px; max-width: 480px; }
.search-form input[type="search"] {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    font: inherit;
}
.search-form button {
    padding: 11px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--c-primary);
    color: var(--c-white);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.search-form button:hover { background: var(--c-primary-light); }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .about-teaser { grid-template-columns: 1fr; }
    .contact-map { height: 360px; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero__stats { grid-template-columns: repeat(2, 1fr); }
    .gratitudes__nav--prev { left: -10px; }
    .gratitudes__nav--next { right: -10px; }
}

@media (max-width: 920px) {
    .nav-toggle { display: block; }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--c-white);
        border-bottom: 1px solid var(--c-border);
        box-shadow: var(--shadow-card-hover);
        padding: 10px 20px 18px;
        display: none;
    }
    .primary-nav.is-open { display: block; }
    .nav-menu { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--c-accent);
        border-radius: 0;
        margin: 2px 0 2px 14px;
        padding-left: 10px;
    }
    .header-cta { display: none; }
    .site-header__inner { position: relative; }
}

@media (max-width: 640px) {
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .contact-map { height: 300px; }
    .footer-cols { grid-template-columns: 1fr; padding: 40px 0 28px; }
    .section { padding: 48px 0; }
    .hero { padding: 56px 0; }
    .hero__stats { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 38px; }
    .topbar__inner { justify-content: center; }
    .page-hero { padding: 38px 0; }
    h1 { font-size: 1.7rem; }
    .hero h1 { font-size: 1.65rem; }
    .gratitudes__item { width: 200px; }
    .gratitudes__nav { width: 38px; height: 38px; }
    .gratitudes__nav--prev { left: -4px; }
    .gratitudes__nav--next { right: -4px; }
    .lightbox { padding: 14px; }
    .lightbox__nav { width: 40px; height: 40px; left: 6px; }
    .lightbox__nav--next { left: auto; right: 6px; }
    .lightbox__close { top: 10px; right: 10px; }
}
