/* FASOC Theme CSS - Custom Styles */
:root {
    --fasoc-bg: #F6F5F2;
    --fasoc-surface: #FFFFFF;
    --fasoc-ink: #0B0D10;
    --fasoc-secondary: #5E636B;
    --fasoc-border: #D8DADF;
    --fasoc-muted: #EEF0F3;
    --fasoc-accent: #2D5BFF;
    --fasoc-accent-hover: #1F46E6;
    --fasoc-accent-subtle: #E8EDFF;
    --fasoc-error: #D92D20;
    --fasoc-success: #12B76A;
}

/* Base Styles */
.fasoc-theme {
    background-color: var(--fasoc-bg);
    color: var(--fasoc-ink);
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Header */
.fasoc-header {
    background-color: var(--fasoc-surface);
    border-bottom: 1px solid var(--fasoc-border);
    padding: 1rem 0;
}

.fasoc-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--fasoc-ink);
    text-decoration: none;
}

.fasoc-subtitle {
    font-size: 0.875rem;
    color: var(--fasoc-secondary);
    margin-left: 0.5rem;
}

.nav-link {
    color: var(--fasoc-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--fasoc-accent) !important;
}

.btn-language {
    border: 1px solid var(--fasoc-border);
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: var(--fasoc-secondary);
}

.search-form input {
    border-radius: 4px;
    border: 1px solid var(--fasoc-border);
    min-width: 200px;
}

/* Hero Section */
.fasoc-hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--fasoc-surface) 0%, var(--fasoc-muted) 100%);
}

.hero-badge {
    display: inline-block;
    background-color: var(--fasoc-accent-subtle);
    color: var(--fasoc-accent);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--fasoc-ink);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--fasoc-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-actions .btn {
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.hero-visual {
    position: relative;
}

.journal-cover {
    background: linear-gradient(45deg, var(--fasoc-accent), #4a72ff);
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 8px;
    position: relative;
    transform: rotate(3deg);
    box-shadow: 0 20px 40px rgba(45, 91, 255, 0.1);
}

.cover-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    color: white;
}

.cover-volume, .cover-date {
    display: block;
    font-family: 'Playfair Display', serif;
}

.cover-volume {
    font-size: 1.5rem;
    font-weight: 700;
}

.cover-shadow {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: var(--fasoc-border);
    border-radius: 8px;
    z-index: -1;
}

/* Stats Section */
.fasoc-stats {
    padding: 3rem 0;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--fasoc-surface);
    border-radius: 12px;
    border: 1px solid var(--fasoc-border);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--fasoc-accent);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.stat-label {
    color: var(--fasoc-secondary);
    margin-top: 0.5rem;
}

/* Featured Issues */
.fasoc-featured {
    padding: 4rem 0;
    background-color: var(--fasoc-surface);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.section-link {
    color: var(--fasoc-accent);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-link:hover {
    color: var(--fasoc-accent-hover);
}

.issue-card {
    background: var(--fasoc-bg);
    border: 1px solid var(--fasoc-border);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s;
}

.issue-card:hover {
    border-color: var(--fasoc-accent);
    box-shadow: 0 8px 24px rgba(45, 91, 255, 0.1);
}

.issue-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.issue-badge {
    background: var(--fasoc-accent-subtle);
    color: var(--fasoc-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.issue-date {
    color: var(--fasoc-secondary);
    font-size: 0.875rem;
}

.issue-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.issue-theme {
    color: var(--fasoc-secondary);
    margin-bottom: 1.5rem;
}

.issue-meta {
    display: flex;
    gap: 1rem;
    color: var(--fasoc-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.issue-link {
    color: var(--fasoc-accent);
    text-decoration: none;
    font-weight: 500;
}

.issue-link:hover {
    color: var(--fasoc-accent-hover);
}

/* Topics Section */
.fasoc-topics {
    padding: 4rem 0;
}

.topic-card {
    background: var(--fasoc-surface);
    border: 2px solid var(--fasoc-border);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: var(--fasoc-ink);
    display: block;
    height: 100%;
    transition: all 0.3s;
}

.topic-card:hover {
    border-color: var(--fasoc-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45, 91, 255, 0.1);
}

.topic-icon {
    width: 64px;
    height: 64px;
    background: var(--fasoc-accent-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.topic-icon i {
    font-size: 1.5rem;
    color: var(--fasoc-accent);
}

.topic-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.topic-description {
    color: var(--fasoc-secondary);
    font-size: 0.875rem;
}

/* Articles Section */
.fasoc-articles {
    padding: 4rem 0;
    background: var(--fasoc-surface);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-preview {
    background: var(--fasoc-bg);
    border: 1px solid var(--fasoc-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.article-preview:hover {
    border-color: var(--fasoc-accent);
    box-shadow: 0 4px 12px rgba(45, 91, 255, 0.1);
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.article-date {
    color: var(--fasoc-secondary);
}

.article-type {
    background: var(--fasoc-muted);
    color: var(--fasoc-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.article-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.article-title a {
    color: var(--fasoc-ink);
    text-decoration: none;
}

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

.article-authors {
    color: var(--fasoc-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

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

.article-link {
    color: var(--fasoc-accent);
    text-decoration: none;
    font-weight: 500;
}

.article-link:hover {
    color: var(--fasoc-accent-hover);
}

.pdf-link {
    color: var(--fasoc-error);
    text-decoration: none;
    font-weight: 500;
}

.pdf-link:hover {
    color: #b32418;
}

/* Cards */
.fasoc-card {
    border: 1px solid var(--fasoc-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.fasoc-card:hover {
    border-color: var(--fasoc-accent);
    box-shadow: 0 8px 24px rgba(45, 91, 255, 0.1);
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.meta-date, .meta-type {
    color: var(--fasoc-secondary);
}

.meta-type {
    background: var(--fasoc-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.card-authors {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination */
.fasoc-pagination .pagination {
    justify-content: center;
}

.fasoc-pagination .page-link {
    color: var(--fasoc-accent);
    border: 1px solid var(--fasoc-border);
    margin: 0 0.25rem;
    border-radius: 6px;
}

.fasoc-pagination .page-link:hover {
    background-color: var(--fasoc-accent-subtle);
    border-color: var(--fasoc-accent);
}

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

/* Breadcrumb */
.fasoc-breadcrumb .breadcrumb-item a {
    color: var(--fasoc-secondary);
    text-decoration: none;
}

.fasoc-breadcrumb .breadcrumb-item.active {
    color: var(--fasoc-ink);
}

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

/* Article Page */
.article-header {
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--fasoc-border);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.article-meta {
    color: var(--fasoc-secondary);
}

.article-abstract {
    background: var(--fasoc-accent-subtle);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--fasoc-accent);
    margin-top: 2rem;
}

.article-abstract h6 {
    color: var(--fasoc-accent);
    margin-bottom: 0.5rem;
}

.article-actions {
    background: var(--fasoc-surface);
    border: 1px solid var(--fasoc-border);
    border-radius: 12px;
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.keyword {
    background: var(--fasoc-muted);
    color: var(--fasoc-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.article-content {
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fasoc-border);
}

.article-content h3 {
    margin-top: 2rem;
}

.citation-box {
    background: var(--fasoc-muted);
    padding: 1.5rem;
    border-radius: 8px;
}

.citation-text {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--fasoc-secondary);
    line-height: 1.6;
}

.article-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-box {
    background: var(--fasoc-surface);
    border: 1px solid var(--fasoc-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-box h6 {
    color: var(--fasoc-accent);
    margin-bottom: 1rem;
}

.language-badges {
    display: flex;
    gap: 0.5rem;
}

.language-badge {
    background: var(--fasoc-accent-subtle);
    color: var(--fasoc-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-links a {
    color: var(--fasoc-accent);
    text-decoration: none;
}

.related-links a:hover {
    text-decoration: underline;
}

/* Related Articles */
.fasoc-related-articles {
    padding: 3rem 0;
    background: var(--fasoc-muted);
    border-radius: 12px;
}

.related-header {
    text-align: center;
    margin-bottom: 3rem;
}

.related-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.related-subtitle {
    color: var(--fasoc-secondary);
}

.fasoc-related-card {
    border: 1px solid var(--fasoc-border);
    border-radius: 8px;
    transition: all 0.3s;
}

.fasoc-related-card:hover {
    border-color: var(--fasoc-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45, 91, 255, 0.1);
}

.related-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--fasoc-secondary);
}

.related-date, .related-type {
    display: inline-block;
}

.related-type {
    background: var(--fasoc-muted);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.related-authors {
    color: var(--fasoc-secondary);
}

/* Blog Styles */
.fasoc-blog-header {
    background: linear-gradient(135deg, var(--fasoc-surface) 0%, var(--fasoc-muted) 100%);
    border-bottom: 1px solid var(--fasoc-border);
}

.blog-title {
    font-size: 2.5rem;
}

.blog-subtitle {
    font-size: 1.125rem;
}

.fasoc-blog-card {
    border: 1px solid var(--fasoc-border);
    border-radius: 12px;
    transition: all 0.3s;
}

.fasoc-blog-card:hover {
    border-color: var(--fasoc-accent);
    box-shadow: 0 8px 24px rgba(45, 91, 255, 0.1);
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--fasoc-secondary);
}

.blog-date, .blog-category {
    display: inline-block;
}

.blog-category {
    background: var(--fasoc-accent-subtle);
    color: var(--fasoc-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    background: var(--fasoc-muted);
    color: var(--fasoc-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Footer */
.fasoc-footer {
    background-color: var(--fasoc-surface);
    border-top: 1px solid var(--fasoc-border);
    padding: 3rem 0 1.5rem;
}

.footer-brand .fasoc-brand {
    font-size: 2rem;
}

.footer-description {
    color: var(--fasoc-secondary);
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 36px;
    height: 36px;
    background: var(--fasoc-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fasoc-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--fasoc-accent);
    color: white;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--fasoc-ink);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--fasoc-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--fasoc-accent);
}

.footer-divider {
    border-color: var(--fasoc-border);
    margin: 2rem 0;
}

.footer-bottom {
    font-size: 0.875rem;
    color: var(--fasoc-secondary);
}

.issn {
    color: var(--fasoc-secondary);
    font-family: monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .hero-visual {
        margin-top: 3rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Markdown Body Styles */
.markdown-body {
    line-height: 1.8;
    color: var(--fasoc-ink);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
}

.markdown-body h1 {
    font-size: 2em;
    border-bottom: 2px solid var(--fasoc-border);
    padding-bottom: 0.3em;
}

.markdown-body h2 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--fasoc-border);
    padding-bottom: 0.3em;
}

.markdown-body p {
    margin-bottom: 1em;
}

.markdown-body a {
    color: var(--fasoc-accent);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.markdown-body code {
    background-color: var(--fasoc-muted);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.875em;
}

.markdown-body pre {
    background-color: var(--fasoc-muted);
    border: 1px solid var(--fasoc-border);
    border-radius: 6px;
    padding: 1em;
    overflow: auto;
    margin-bottom: 1em;
}

.markdown-body blockquote {
    border-left: 4px solid var(--fasoc-accent);
    padding-left: 1em;
    margin-left: 0;
    color: var(--fasoc-secondary);
    font-style: italic;
}

.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid var(--fasoc-border);
    padding: 0.5em 1em;
    text-align: left;
}

.markdown-body th {
    background-color: var(--fasoc-muted);
    font-weight: 600;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Utility Classes */
.highlight {
    background-color: var(--fasoc-accent-subtle);
    border-left: 4px solid var(--fasoc-accent);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.alert-error {
    background-color: rgba(217, 45, 32, 0.1);
    border-color: var(--fasoc-error);
    color: var(--fasoc-error);
}

.alert-success {
    background-color: rgba(18, 183, 106, 0.1);
    border-color: var(--fasoc-success);
    color: var(--fasoc-success);
}

/* Print Styles */
@media print {
    .fasoc-header,
    .fasoc-footer,
    .article-actions,
    .article-sidebar,
    .fasoc-related-articles {
        display: none !important;
    }

    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
}

/* --- Journal cover image (hero) --- */
.hero-visual {
    max-width: 520px;
    margin-left: auto;
}

.journal-cover {
    overflow: hidden;
    position: relative;
    /* текущий градиент оставляем как фолбэк если картинка не загрузится */
}

.journal-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.03);
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            180deg,
            rgba(11, 13, 16, 0) 40%,
            rgba(11, 13, 16, 0.55) 100%
    );
    z-index: 1;
}

.cover-content {
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Mobile tweaks */
@media (max-width: 576px) {
    .hero-visual {
        max-width: 380px;
        margin: 2rem auto 0;
    }

    .journal-cover {
        transform: none; /* на мобиле убираем наклон */
    }

    .cover-shadow {
        top: 12px;
        left: 12px;
        right: -12px;
        bottom: -12px;
    }

    .cover-content {
        bottom: 1.25rem;
        left: 1.25rem;
    }

    .cover-volume {
        font-size: 1.25rem;
    }
}
/* Featured issues cards */
.fasoc-featured .section-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    margin-bottom: 2rem;
}

.issue-card{
    height:100%;
    background:#fff;
    border:1px solid var(--fasoc-border);
    border-radius:14px;
    overflow:hidden;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
    transition: transform .15s ease, box-shadow .15s ease;
}

.issue-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}

.issue-cover{
    aspect-ratio: 16/10;
    background: #f3f6fa;
    position: relative;
    overflow:hidden;
}

.issue-cover img{
    width:100%;
    height:100%;
    object-fit: cover;
    display:block;
}

.issue-body{
    padding: 1.25rem 1.25rem 1.35rem;
}

.issue-kicker{
    display:inline-block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--fasoc-accent);
    background: rgba(45, 91, 255, 0.10);
    padding: .35rem .55rem;
    border-radius: 999px;
    margin: 0 0 .75rem;
}

.issue-title{
    font-size: 1.15rem;
    line-height: 1.25;
    margin: 0 0 .35rem;
}

.issue-meta{
    margin: 0 0 .75rem;
    color: var(--fasoc-text-muted);
    font-size: .95rem;
}

.issue-desc{
    margin: 0 0 1rem;
    color: #2a2f38;
    font-size: .95rem;
}

.issue-actions{
    display:flex;
    flex-wrap:wrap;
    gap:.6rem;
}

@media (max-width: 576px){
    .fasoc-featured .section-header{
        flex-direction: column;
        align-items:flex-start;
    }
}

.issue-link{
    color: inherit;
    text-decoration: none;
}

.issue-link:hover{
    color: var(--fasoc-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

