/* ===== ТК 246 — кастомные стили поверх Bootstrap 5 ===== */
:root {
    --brand: #0d4f8b;
    --brand-dark: #0a3a66;
    --brand-light: #1769c0;
    --accent: #00a0b0;
    --ink: #1a2330;
    --muted: #5b6776;
    --bg-soft: #f4f7fb;
    --border: #e4e9f0;
    --radius: 14px;
    --shadow-sm: 0 2px 10px rgba(13, 79, 139, .06);
    --shadow-md: 0 10px 30px rgba(13, 79, 139, .12);
}

* { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: #fff;
    font-size: 1rem;
    line-height: 1.65;
}

a { color: var(--brand-light); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    font-weight: 600;
}

.section-heading {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--ink);
    position: relative;
    padding-bottom: .6rem;
}
.section-heading::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 56px; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    border-radius: 3px;
}

/* ===== Header ===== */
.site-header {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.navbar { padding-top: .6rem; padding-bottom: .6rem; }
.brand-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff; font-weight: 800; border-radius: 11px;
    box-shadow: var(--shadow-sm); letter-spacing: -.5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.05rem; color: var(--ink); }
.brand-text small { font-size: .72rem; color: var(--muted); }

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--ink);
    padding: .5rem .85rem;
    border-radius: 8px;
}
.navbar-nav .nav-link:hover { color: var(--brand); background: var(--bg-soft); }
.navbar-nav .nav-link.active { color: var(--brand); font-weight: 600; }
.dropdown-menu { border: 1px solid var(--border); box-shadow: var(--shadow-md); border-radius: 12px; padding: .4rem; }
.dropdown-item { border-radius: 8px; font-weight: 500; padding: .5rem .8rem; }
.dropdown-item:hover { background: var(--bg-soft); color: var(--brand); }

/* ===== Hero ===== */
.hero {
    background:
        radial-gradient(1200px 400px at 80% -10%, rgba(0, 160, 176, .25), transparent),
        linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: #fff;
    padding: 5.5rem 0 5rem;
}
.hero-eyebrow {
    display: inline-block;
    font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .12);
    padding: .35rem .9rem; border-radius: 30px; margin-bottom: 1.2rem;
}
.hero-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; max-width: 16ch; line-height: 1.15; }
.hero-subtitle { font-size: 1.15rem; color: rgba(255, 255, 255, .9); max-width: 60ch; margin: 1.2rem 0 2rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-image { width: 100%; height: auto; filter: drop-shadow(0 18px 35px rgba(0, 0, 0, .35)); }

/* ===== Структура (struct-item) ===== */
.struct-item { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); }
.struct-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.struct-tag { flex-shrink: 0; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; font-weight: 700; font-size: .85rem; padding: .3rem .8rem; border-radius: 30px; }
.struct-head h3 { font-size: 1.12rem; font-weight: 700; color: var(--ink); margin: 0; }
.struct-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.struct-meta li { color: var(--muted); font-size: .95rem; }
.struct-meta strong { color: var(--ink); font-weight: 600; }

/* ===== Состав (member-list) ===== */
.member-list { counter-reset: member; list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.member-list li { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem 1.3rem 3.6rem; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.member-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.member-list li::before { counter-increment: member; content: counter(member); position: absolute; left: 1.1rem; top: 1.3rem; width: 30px; height: 30px; background: var(--bg-soft); color: var(--brand); font-weight: 700; font-size: .85rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.member-list h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0 0 .4rem; }
.member-addr { color: var(--muted); font-size: .92rem; margin: 0 0 .3rem; }
.member-contacts { color: #34404f; font-size: .9rem; margin: 0; }

@media (max-width: 575.98px) {
    .member-list li { padding-left: 1.4rem; }
    .member-list li::before { position: static; display: inline-flex; margin-bottom: .5rem; }
}

/* ===== Page header ===== */
.page-header { background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 2.5rem 0; }
.page-title { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; }
.breadcrumb { font-size: .88rem; }
.breadcrumb-item.active { color: var(--muted); }

/* ===== Content ===== */
.content-block p { color: #34404f; }
.content-block .lead { color: var(--ink); }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.feature-list li { display: flex; gap: .8rem; align-items: flex-start; background: var(--bg-soft); padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--border); }
.feature-list i { color: var(--accent); font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }

.quick-card { display: block; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.quick-card i { font-size: 2rem; color: var(--brand); }
.quick-card h3 { font-size: 1.2rem; font-weight: 700; margin: .8rem 0 .3rem; color: var(--ink); }
.quick-card p { color: var(--muted); margin: 0; font-size: .95rem; }

.info-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; height: 100%; }
.info-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--brand); margin-bottom: .5rem; }
.info-card p { margin: 0; color: var(--muted); }
a.info-card { display: block; color: inherit; text-decoration: none; }
a.info-card:hover { color: inherit; }

/* ===== Steps (join) ===== */
.steps-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.steps-list li { display: flex; gap: 1rem; align-items: flex-start; }
.step-num { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.steps-list p { margin: .2rem 0 0; color: var(--muted); }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.8rem; }

/* ===== Contacts ===== */
.contact-list { list-style: none; padding: 0; display: grid; gap: 1rem; margin: 0; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list i { font-size: 1.3rem; color: var(--brand); margin-top: .2rem; }
.contact-list span { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ===== News cards ===== */
.news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: #c3cedd; font-size: 2.5rem; }
.news-card-body { padding: 1.3rem; display: flex; flex-direction: column; flex-grow: 1; }
.news-date { font-size: .82rem; color: var(--muted); font-weight: 500; }
.news-card-title { font-size: 1.15rem; font-weight: 700; margin: .5rem 0 .6rem; line-height: 1.35; }
.news-card-title a { color: var(--ink); }
.news-card-title a:hover { color: var(--brand); }
.news-card-excerpt { color: var(--muted); font-size: .95rem; flex-grow: 1; }
.news-card-link { font-weight: 600; font-size: .9rem; margin-top: .8rem; display: inline-flex; align-items: center; gap: .35rem; }
.news-card-link i { transition: transform .15s ease; }
.news-card-link:hover i { transform: translateX(3px); }

/* ===== Article (news detail) ===== */
.article-title { font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.2; }
.article-image { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.article-body { font-size: 1.08rem; color: #2d3845; }
.article-body p { margin-bottom: 1.1rem; }

.sidebar-title { font-size: 1.05rem; font-weight: 700; padding-bottom: .6rem; border-bottom: 2px solid var(--border); }
.sidebar-news { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
.sidebar-news a { display: block; }
.sidebar-news-date { display: block; font-size: .78rem; color: var(--muted); }
.sidebar-news-title { display: block; font-weight: 600; color: var(--ink); font-size: .96rem; }
.sidebar-news a:hover .sidebar-news-title { color: var(--brand); }

/* ===== Documents ===== */
.doc-list { display: grid; gap: .8rem; }
.doc-item { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow-sm); transition: border-color .15s ease, transform .15s ease; }
.doc-item:hover { border-color: var(--brand-light); transform: translateX(3px); }
.doc-icon { flex-shrink: 0; width: 54px; height: 54px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.doc-info { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.doc-title { font-weight: 600; color: var(--ink); }
.doc-meta { font-size: .82rem; color: var(--muted); }
.doc-download { font-size: 1.3rem; color: var(--brand); }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty-state i { font-size: 3.5rem; color: #c3cedd; }
.empty-state h3 { margin: 1rem 0 .5rem; color: var(--ink); font-weight: 700; }

/* ===== Pagination ===== */
.pagination { --bs-pagination-color: var(--brand); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-border-radius: 10px; gap: .35rem; }
.page-link { border-radius: 10px !important; border-color: var(--border); }

/* ===== Footer ===== */
.site-footer { background: #0c1c2e; color: #cdd7e3; }
.site-footer .brand-badge { box-shadow: none; }
.footer-title { color: #fff; font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-links a { color: #aab8c8; }
.footer-links a:hover { color: #fff; }
.site-footer .text-secondary { color: #8b99aa !important; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }

@media (max-width: 991.98px) {
    .navbar-nav { padding: .8rem 0; gap: .2rem; }
    .navbar-nav .btn { display: inline-block; margin-top: .4rem; }
    .hero { padding: 3.5rem 0; }
}
