/* =============================================================================
   Mengenal Indonesia (invonesia.com) — restored stylesheet
   Пересобрано вместо WordPress-темы «basically» + плагинов (jQuery, share-кнопки,
   popular-posts-tab, related-posts, si-captcha) в самостоятельный CSS.
   ============================================================================= */

/* ----------------------------------------------------------------- Токены -- */
:root {
    --bg:            #fff;
    --bg-soft:       #f0f0f0;
    --border:        #ddd;
    --border-soft:   #eee;
    --text:          #333;
    --muted:         #777;
    --accent:        #1f6f43;   /* зелёный — под флаг/природу Индонезии */
    --accent-warm:   #b3352e;

    --font-head: Georgia, Palatino, "Palatino Linotype", Times, "Times New Roman", serif;
    --font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
    --container: 1080px;
}

/* ------------------------------------------------------------------ Сброс -- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-family: var(--font-head); line-height: 1.3; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

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

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.note {
    padding: 12px 14px;
    font-size: 0.875rem;
    color: var(--muted);
    background: var(--bg-soft);
    border-left: 3px solid var(--border);
}

/* ----------------------------------------------------------------- Шапка -- */
.site-header { border-bottom: 1px solid var(--border); }

.masthead {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-block: 26px;
}
.masthead__text { flex: 1 1 auto; min-width: 0; }

.brand__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--accent);
}
.brand__tagline {
    margin: 4px 0 0;
    font-size: 0.9375rem;
    color: var(--muted);
}

/* Меню */
.primary-nav { background: var(--accent); }
.primary-nav ul { display: flex; flex-wrap: wrap; }
.primary-nav a {
    display: block;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}
.primary-nav a:hover { background: rgba(0, 0, 0, 0.22); }
.primary-nav a[aria-current="page"] { background: rgba(0, 0, 0, 0.3); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 46px; height: 42px;
    padding: 9px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    width: 100%; height: 2px;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------------------------------------------------------------- Макет --- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 40px;
    padding-block: 32px;
    align-items: start;
}
.layout > * { min-width: 0; }
.layout__main > section + section { margin-top: 42px; }

.section-title {
    margin-bottom: 20px;
    padding-bottom: 8px;
    font-size: 1.5rem;
    color: var(--accent);
    border-bottom: 2px solid var(--border);
}

.prose h3 {
    margin: 1.4em 0 0.4em;
    font-size: 1.0625rem;
}
.prose p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------- Список статей ---- */
.post-list { display: grid; gap: 0; margin-bottom: 22px; }

.post {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-soft);
}
.post:first-child { padding-top: 0; }

.post__thumb {
    flex: 0 0 auto;
    width: 150px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--border);
}
.post__body { min-width: 0; }
.post__title { font-size: 1.1875rem; }

.post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 6px 0 8px;
    font-size: 0.8125rem;
    color: var(--muted);
}
.post__cat { color: var(--accent-warm); font-weight: bold; }
.post__excerpt { margin: 0; font-size: 0.9375rem; }

/* --------------------------------------------------------------- Сайдбар -- */
.sidebar { display: grid; gap: 24px; }

.widget {
    padding: 16px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}
.widget__title {
    margin-bottom: 10px;
    padding-bottom: 8px;
    font-size: 1.0625rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}
.widget__list li {
    padding: 8px 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border);
}
.widget__list li:last-child { border-bottom: 0; padding-bottom: 0; }

.widget__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.widget__tags li {
    padding: 4px 10px;
    font-size: 0.8125rem;
    background: var(--bg);
    border: 1px solid var(--border);
}

/* ---------------------------------------------------------------- Футер --- */
.site-footer {
    padding: 30px 0;
    color: #e8e8e8;
    background: #2b2b2b;
}
.site-footer__title { font-size: 1.25rem; margin-bottom: 10px; color: #fff; }
.site-footer__about { max-width: 70ch; font-size: 0.9375rem; }
.site-footer__copyright {
    margin: 16px 0 0;
    padding-top: 14px;
    font-size: 0.8125rem;
    color: #a5a5a5;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ------------------------------------------------------------ Мобильные -- */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; gap: 28px; }

    .nav-toggle { display: flex; }

    .primary-nav { display: none; }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; }
    .primary-nav a { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }

    .post { flex-direction: column; }
    .post__thumb { width: 100%; aspect-ratio: 16 / 9; }
}

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