/* ============================================================
   Геологиум.ру — современная тема
   Палитра: тёмный сланец, тёплый камень, медный акцент
   ============================================================ */

:root {
    --stone-50: #f7f6f2;
    --stone-100: #efede6;
    --stone-200: #e3dfd5;
    --stone-300: #d2ccbf;
    --ink: #141c26;
    --ink-soft: #33404d;
    --muted: #66717d;
    --accent: #b5652f;
    --accent-dark: #8d4a21;
    --accent-soft: #f5e7da;
    --teal: #2f5d62;
    --header-1: #0b141f;
    --header-2: #16304a;
    --header-3: #1d4045;
    --surface: #ffffff;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 32, 0.06);
    --shadow-md: 0 18px 40px -24px rgba(15, 23, 32, 0.35);
    --shadow-header: 0 10px 30px -12px rgba(12, 20, 30, 0.45);
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--stone-50);
    background-image:
        radial-gradient(circle at 12% 0%, rgba(181, 101, 47, 0.07), transparent 42%),
        radial-gradient(circle at 88% 6%, rgba(47, 93, 98, 0.08), transparent 40%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--accent-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent);
}

/* ===== Каркас ===== */

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Шапка ===== */

header {
    position: sticky;
    top: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 68px;
    margin-top: 16px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(115deg, var(--header-1) 0%, var(--header-2) 58%, var(--header-3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-header);
}

.header-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-logo:hover {
    opacity: 0.82;
}

.logo {
    height: 38px;
}

.logo img {
    height: 100%;
    width: auto;
}

.main-menu {
    margin-left: auto;
}

.menu-dropdown {
    position: relative;
}

.menu-dropdown__toggle {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-dropdown__toggle::-webkit-details-marker {
    display: none;
}

.menu-dropdown__toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.menu-dropdown__burger {
    display: none;
    font-size: 1.2rem;
    line-height: 1;
}

.menu-dropdown[open] .menu-dropdown__toggle {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

.menu-dropdown__list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 200;
    min-width: 320px;
    max-width: min(90vw, 420px);
    margin: 0;
    padding: 8px;
    list-style: none;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
    box-shadow: 0 24px 50px -18px rgba(15, 23, 32, 0.35);
}

.menu-dropdown__item {
    margin: 0;
}

.menu-dropdown__link {
    display: block;
    padding: 10px 14px;
    color: var(--ink-soft);
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
}

.menu-dropdown__link:hover {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

/* ===== Основная сетка ===== */

.main-content {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    flex: 1 0 auto;
    margin: 28px 0 0;
}

.left-column {
    flex: 1;
    min-width: 0;
    min-height: 420px;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.right-column {
    flex-shrink: 0;
    width: 300px;
    position: sticky;
    top: 100px;
    padding: 22px;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ===== Подвал ===== */

footer {
    margin-top: 44px;
    padding: 26px 0 38px;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
    border-top: 1px solid var(--stone-200);
}

.footer-copyright {
    margin-bottom: 4px;
}

.footer-contasts {
    margin-bottom: 0;
}

.footer-email {
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--stone-300);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-email:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ===== Типографика ===== */

h1,
h2,
h3 {
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.22;
}

h1 {
    font-size: clamp(1.7rem, 2.4vw, 2.15rem);
    margin-bottom: 18px;
}

h2 {
    font-size: 1.35rem;
    margin-bottom: 14px;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

p {
    margin-bottom: 12px;
    line-height: 1.72;
}

ul,
ol {
    margin: 1em 0;
    padding-left: 1.4em;
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

li {
    line-height: 1.7;
}

strong {
    font-weight: 600;
}

/* ===== Статьи ===== */

.news-article,
.guide-article,
.guide-section {
    font-size: 1.02rem;
}

.news-article h1,
.guide-article h1,
.guide-section > h1 {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--stone-200);
}

.news-article h2,
.guide-article h2 {
    margin-top: 30px;
}

.news-article h3,
.guide-article h3 {
    margin-top: 22px;
}

.news-article p,
.guide-article p {
    color: var(--ink-soft);
}

.news-article img,
.guide-article img {
    margin: 22px auto;
    border-radius: var(--radius-sm);
}

.news-article blockquote,
.guide-article blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    color: var(--ink-soft);
    background: var(--stone-50);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.news-article table,
.guide-article table {
    width: 100%;
    margin: 22px 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.news-article th,
.news-article td,
.guide-article th,
.guide-article td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--stone-200);
}

.news-article th,
.guide-article th {
    background: var(--stone-50);
    font-weight: 600;
}

.linker,
.linker:visited {
    color: var(--accent-dark);
    text-decoration: none;
    border-bottom: 1px solid rgba(181, 101, 47, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.linker:hover,
.linker:active,
.linker:focus {
    color: var(--accent);
    border-color: var(--accent);
}

.news-meta-info {
    display: flex;
    width: fit-content;
    margin: 24px 0 0 auto;
    color: var(--muted);
    font-size: 0.82rem;
}

.news-date {
    padding: 4px 12px;
    background: var(--stone-100);
    border-radius: 999px;
}

/* ===== Похожие новости ===== */

.right-column h2 {
    padding-bottom: 12px;
    margin-bottom: 14px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--stone-200);
}

.similar-news__item {
    position: relative;
    margin-bottom: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--stone-100);
}

.similar-news__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.similar-news__link {
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.similar-news__link:hover {
    color: var(--accent);
}

/* ===== Справочник: алфавит и список ===== */

.alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--stone-200);
}

.alphabet__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.5;
    text-decoration: none;
    background: var(--stone-50);
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.alphabet__link:hover {
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-color: rgba(181, 101, 47, 0.35);
}

.alphabet__link--active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.alphabet__count {
    color: var(--muted);
    font-size: 0.72rem;
}

.alphabet__link--active .alphabet__count {
    color: rgba(255, 255, 255, 0.75);
}

.guide-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px 28px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.guide-list__item {
    margin-bottom: 0;
    line-height: 1.5;
    border-bottom: 1px solid var(--stone-100);
}

.guide-list__item a {
    display: block;
    padding: 9px 0;
    font-size: 0.96rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 26px;
}

.pagination__link {
    padding: 6px 13px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.pagination__link:hover {
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-color: rgba(181, 101, 47, 0.35);
}

.pagination__link--current {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

/* ===== Главная ===== */

.home-hero {
    position: relative;
    overflow: hidden;
    padding: 52px 48px 44px;
    margin-bottom: 36px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 18%, rgba(181, 101, 47, 0.35), transparent 46%),
        linear-gradient(120deg, var(--header-1) 0%, var(--header-2) 55%, var(--header-3) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(168deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 46px),
        radial-gradient(circle at 15% 110%, rgba(255, 255, 255, 0.08), transparent 55%);
}

.home-hero > * {
    position: relative;
    z-index: 1;
}

.home-hero__eyebrow {
    margin-bottom: 14px;
    color: #e8b98c;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin-bottom: 16px;
    color: #fff;
    font-size: clamp(2.2rem, 4.5vw, 3.15rem);
}

.home-hero__lead {
    max-width: 640px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.05rem;
    line-height: 1.65;
}

.home-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.home-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-stat strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
}

.home-stat span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.home-block {
    margin-bottom: 38px;
}

.home-block h2,
.home-about h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
    font-size: 1.4rem;
}

.home-block h2::before,
.home-about h2::before {
    content: "";
    width: 4px;
    height: 1.05em;
    background: var(--accent);
    border-radius: 2px;
}

.home-guides {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

.home-guide-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 22px 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-guide-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--teal));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.home-guide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(181, 101, 47, 0.4);
    box-shadow: 0 20px 34px -24px rgba(15, 23, 32, 0.45);
}

.home-guide-card:hover::before {
    opacity: 1;
}

.home-guide-card__title {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
}

.home-guide-card__count {
    color: var(--muted);
    font-size: 0.83rem;
    letter-spacing: 0.01em;
}

.home-about {
    padding: 28px 30px;
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.home-about p {
    max-width: 820px;
    color: var(--ink-soft);
}

.home-about p:last-child {
    margin-bottom: 0;
}

/* ===== Служебные блоки ===== */

.content-block {
    padding: 20px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.under-construction {
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
}

/* ===== Адаптивность ===== */

@media (max-width: 900px) {
    .right-column {
        width: 260px;
    }

    .left-column {
        padding: 26px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }

    header {
        top: 0;
        height: 62px;
        margin-top: 0;
        padding: 0 14px;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .logo {
        height: 28px;
    }

    .menu-dropdown__burger {
        display: inline;
    }

    .menu-dropdown__label {
        display: none;
    }

    .menu-dropdown__toggle {
        padding: 7px 12px;
    }

    .menu-dropdown__list {
        position: fixed;
        top: 62px;
        left: 0;
        right: 0;
        bottom: 0;
        min-width: 0;
        max-width: none;
        padding: 10px;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
    }

    .menu-dropdown__link {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .main-content {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
    }

    .left-column {
        width: 100%;
        padding: 20px;
    }

    .right-column {
        position: static;
        width: 100%;
    }

    .home-hero {
        padding: 34px 24px 30px;
        margin-bottom: 28px;
    }

    .home-hero__stats {
        gap: 28px;
        margin-top: 24px;
        padding-top: 20px;
    }

    .home-stat strong {
        font-size: 1.3rem;
    }

    .home-guides,
    .guide-list {
        grid-template-columns: 1fr;
    }

    .home-about {
        padding: 22px;
    }

    footer {
        margin-top: 28px;
    }
}

@media (max-width: 420px) {
    .home-hero h1 {
        font-size: 1.9rem;
    }

    .home-hero__stats {
        flex-direction: column;
        gap: 14px;
    }
}
