/* ============================================================
   Вестник ТПЭИ — Public Site Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary:        #1a3a6b;
    --primary-light:  #2456a4;
    --primary-dark:   #112650;
    --accent:         #c8952a;
    --accent-light:   #e8b84b;
    --text:           #2c3140;
    --muted:          #6b7280;
    --border:         #e2e8f0;
    --bg:             #f8fafc;
    --white:          #ffffff;
    --card-shadow:    0 2px 12px rgba(26,58,107,.09);
    --card-hover:     0 6px 24px rgba(26,58,107,.16);
    --radius:         8px;
    --transition:     .22s ease;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.3;
}

/* ---------- Navbar ---------- */
.site-navbar {
    background: var(--white) !important;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    padding: 0;
}

.site-navbar .navbar-brand {
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-navbar .brand-main {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: -.3px;
}

.site-navbar .brand-sub {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.site-navbar .nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text) !important;
    padding: 1.1rem 0.9rem !important;
    border-bottom: 3px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--primary) !important;
    border-bottom-color: var(--accent);
}

.site-navbar .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    min-width: 100px;
}

.site-navbar .dropdown-item {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
}

.site-navbar .dropdown-item:hover {
    background: var(--bg);
    color: var(--primary);
}

/* ---------- Hero ---------- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: var(--white);
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.hero-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.6rem;
    position: relative;
}

.hero-section .hero-sub {
    font-size: 1.05rem;
    opacity: .85;
    margin-bottom: 0;
    position: relative;
}

.hero-section .hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    position: relative;
}

/* ---------- Section headings ---------- */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    padding-bottom: 0.6rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* ---------- Article Cards ---------- */
.article-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.4rem;
    transition: box-shadow var(--transition), transform var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: var(--card-hover);
    transform: translateY(-2px);
}

.article-card-body {
    padding: 1.5rem 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-card-title a {
    color: inherit;
}

.article-card-title a:hover {
    color: var(--accent);
}

.article-card-authors {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
    font-style: italic;
}

.article-card-abstract {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.article-card-meta {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.article-card-meta .badge-issue {
    background: #eef2ff;
    color: var(--primary);
    border-radius: 12px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---------- Sidebar ---------- */
.sidebar-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.sidebar-card-header {
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.sidebar-card-body {
    padding: 1rem 1.25rem;
}

.sidebar-issue-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: color var(--transition);
}

.sidebar-issue-item:last-child { border-bottom: none; }

.sidebar-issue-item:hover { color: var(--primary); }

.sidebar-issue-badge {
    background: var(--primary);
    color: var(--white);
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
    min-width: 42px;
}

.sidebar-issue-label {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-issue-year {
    font-size: 0.75rem;
    color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: 6px;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: 6px;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    font-weight: 600;
    border-radius: 6px;
}

.btn-accent:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-light);
    color: var(--white);
}

.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.75rem; }

/* ---------- Archive Page ---------- */
.year-heading {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 0.85rem;
}

.issue-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    height: 100%;
}

.issue-card:hover {
    box-shadow: var(--card-hover);
    transform: translateY(-3px);
}

.issue-card-cover {
    height: 220px;
    object-fit: cover;
    width: 100%;
}

.issue-card-cover-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #e8eef7 0%, #d0daed 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    gap: 0.5rem;
}

.issue-card-cover-placeholder .placeholder-vol {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0.5;
}

.issue-card-cover-placeholder .placeholder-lbl {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
}

.issue-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
}

.issue-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
}

.issue-card-meta {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.9rem;
}

/* ---------- Documents Page ---------- */
.docs-group { margin-bottom: 2.5rem; }

.docs-group-heading {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border);
}

.doc-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    transition: box-shadow var(--transition);
    gap: 1rem;
}

.doc-item:hover { box-shadow: var(--card-shadow); }

.doc-icon {
    font-size: 1.6rem;
    color: #e53e3e;
    flex-shrink: 0;
}

.doc-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.doc-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
}

/* ---------- About / Journal Info ---------- */
.info-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.info-block h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.info-block p {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 0;
}

/* Editorial board */
.editorial-grid { margin-top: 1.5rem; }

.member-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow var(--transition);
    height: 100%;
    text-align: center;
}

.member-card:hover { box-shadow: var(--card-hover); }

.member-avatar {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.member-avatar-placeholder {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #e8eef7, #c8d8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--primary);
    opacity: 0.5;
}

.member-body {
    padding: 1rem;
}

.member-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
}

.member-position {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

/* ---------- Article Detail ---------- */
.article-detail-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.3;
    margin-bottom: 1.25rem;
}

.article-meta-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.article-meta-block .meta-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    align-items: baseline;
}

.article-meta-block .meta-row:last-child { margin-bottom: 0; }

.article-meta-block .meta-label {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    min-width: 110px;
}

.article-section {
    margin-bottom: 1.75rem;
}

.article-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.keywords-list li {
    background: #eef2ff;
    color: var(--primary);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Issue detail table */
.issue-articles-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---------- Pagination ---------- */
.pagination {
    justify-content: center;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.pagination .page-link {
    color: var(--primary);
    border-color: var(--border);
    border-radius: 6px !important;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination .page-item.disabled .page-link {
    color: var(--muted);
    border-color: var(--border);
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--radius);
    border: none;
    font-size: 0.92rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-nav {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.breadcrumb { margin: 0; }

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.8);
    margin-top: auto;
    padding: 3rem 0 1.5rem;
}

.site-footer h5 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255,255,255,.15);
}

.site-footer p {
    font-size: 0.875rem;
    color: rgba(255,255,255,.7);
    line-height: 1.6;
}

.site-footer a {
    color: rgba(255,255,255,.7);
    font-size: 0.875rem;
    transition: color var(--transition);
    display: block;
    margin-bottom: 0.3rem;
}

.site-footer a:hover { color: var(--accent-light); }

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.15);
    margin-top: 2rem;
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,.5);
}

.site-footer .footer-accent {
    color: var(--accent-light);
    font-weight: 700;
}

/* ---------- Page header ---------- */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.page-header .page-header-sub {
    color: var(--muted);
    font-size: 0.92rem;
}

/* ---------- Utilities ---------- */
.text-accent { color: var(--accent) !important; }
.bg-primary-dark { background-color: var(--primary-dark) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .site-navbar .nav-link {
        padding: 0.6rem 0.75rem !important;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .site-navbar .nav-link:hover,
    .site-navbar .nav-link.active {
        border-left-color: var(--accent);
        border-bottom-color: transparent;
        background: var(--bg);
    }
}

@media (max-width: 768px) {
    .hero-section { padding: 2.2rem 1.5rem; }
    .hero-section h1 { font-size: 1.6rem; }

    .article-card-body { padding: 1.1rem; }
    .article-card-footer { flex-direction: column; align-items: flex-start; }

    .article-detail-title { font-size: 1.35rem; }

    .site-footer { padding: 2rem 0 1rem; }
}
