/* Общие стили внутренних страниц */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --site-header-h: 75px;
    --bg-main: #f9f9f9;
    --bg-card: #ffffff;
    --bg-header-footer: #ffffff;
    --text-primary: #111111;
    --text-secondary: #2b2b2b;
    --text-muted: #555555;
    --text-light: #666666;
    --border-color: #e5e5e5;
    --card-border: #e8e8e8;
    --badge-bg: #ffffff;
    --badge-border: #ddd;
    --badge-text: #444444;
    --blockquote-bg: #fdfdfd;
    --table-row-even: #fdfdfd;
    --table-th-bg: #fafdff;
}

body.dark-theme {
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --bg-header-footer: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #aaaaaa;
    --text-light: #b0b0b0;
    --border-color: #333333;
    --card-border: #2c2c2c;
    --badge-bg: #252525;
    --badge-border: #444444;
    --badge-text: #cccccc;
    --blockquote-bg: #252525;
    --table-row-even: #252525;
    --table-th-bg: #2d2d2d;
}

body {
    color: var(--text-secondary, var(--text-muted));
    background-color: var(--bg-main);
    padding-top: 75px;
    transition: background-color 0.3s, color 0.3s;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }
a { text-decoration: none; color: inherit; transition: all 0.4s ease; }
[id] { scroll-margin-top: 90px; }

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: var(--bg-header-footer);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    z-index: 10000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.header-container { display: flex; justify-content: space-between; align-items: center; height: 100%; position: relative; }

.logo-holder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: var(--font-heading);
}

.logo-line1 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.5px; color: var(--text-primary); line-height: 1.2; }
.logo-line1 span { color: #d62828; }
.logo-line2 { font-size: 0.75rem; font-weight: 500; color: var(--text-light); letter-spacing: 0.3px; text-transform: uppercase; margin-top: 2px; }

.theme-toggle-btn {
    background: transparent;
    border: 2px solid #d62828;
    color: #d62828;
    padding: 6px 14px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: #d62828;
    color: #fff;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d62828;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.btn-back:hover { transform: translateX(-5px); }

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-family: var(--font-body, inherit);
    font-weight: 400;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 30px;
}

.breadcrumbs a {
    color: #d62828;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

.breadcrumbs-sep { color: #ccc; }

.breadcrumbs-current { color: #333; }

.page-content-section { padding: 60px 0 100px; min-height: calc(100vh - 400px); }

.page-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    position: relative;
}

.page-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: #d62828;
    margin-top: 15px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 50px;
    line-height: 1.6;
    max-width: 800px;
}

.category-section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 20px;
    text-transform: uppercase;
    border-left: 4px solid #d62828;
    padding-left: 15px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-5px);
    border-color: #d62828;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.item-card-content h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.item-card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.tech-spec {
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: auto;
    font-family: var(--font-body);
}

.tech-spec span { color: var(--text-primary); font-weight: 500; }

.info-badge-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }

.info-badge {
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 0.85rem;
    color: var(--badge-text);
    font-weight: 500;
}

.info-badge.red-badge { border-color: #d62828; color: #d62828; background: transparent; }
.info-badge.atomic-badge { border-color: #0091d5; color: #0091d5; background: transparent; }

@media (max-width: 950px) {
    :root { --site-header-h: 60px; }
    body { padding-top: 60px; }
    .site-header { height: 60px; }
    .container { padding: 0 18px; }
    [id] { scroll-margin-top: 72px; }
    .header-container { gap: 10px; }
    .logo-holder {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 150px);
    }
    .logo-line1 { font-size: 0.82rem; line-height: 1.15; }
    .logo-line2 { display: none; }
    .page-content-section { padding: 40px 0 70px; }
    .page-title { font-size: clamp(1.6rem, 5vw, 2rem); }
    .page-lead { font-size: 0.95rem; }
    .items-grid { grid-template-columns: 1fr; gap: 20px; }
    .atomic-section { padding: 28px 18px; }
    .item-card { padding: 22px 18px; }
    .theme-toggle-btn { padding: 4px 8px; font-size: 0.68rem; }
}

@media (max-width: 480px) {
    .logo-holder { max-width: calc(100% - 132px); }
    .logo-line1 { font-size: 0.72rem; }
    .theme-toggle-btn { padding: 4px 6px; font-size: 0.62rem; }
}
