/* ===== DESIGN TOKENS — iomining.in.ua (Гірничий Вісник) ===== */
/* Based on Themify Ultra theme snapshot 20200807122629 */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400;1,600&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Animated background accent colors (cycling) */
    --accent-1: #33baab;
    --accent-2: #dd5135;
    --accent-3: #2bb8ed;
    --accent-4: #2ea85c;
    --accent-5: #4961d7;
    --accent-6: #e33b9e;
    /* UI colors */
    --dark-bg:     #232323;
    --light-bg:    #f3f3f3;
    --white:       #ffffff;
    --text-dark:   #333333;
    --text-muted:  #666666;
    --border:      #e0e0e0;
}


/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption,
center, cite, code, command, datalist, dd, del, details, dfn, div, dl, dt, em, embed, fieldset,
figcaption, figure, font, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe,
img, ins, kbd, keygen, label, legend, li, meter, nav, object, ol, output, p, pre, progress, q, s,
samp, section, small, source, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead,
tr, tt, u, ul, var, video {
    background: 0 0; border: 0; font-size: 100%; margin: 0; padding: 0; outline: 0; vertical-align: top;
}
ol, ul { list-style: none; }
table, table td { padding: 0; border: none; border-collapse: collapse; }

/* ===== BASE ===== */
body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-bg);
    overflow-x: hidden;
}

/* ===== SITE HEADER ===== */
.site-header {
    background-color: var(--accent-1);
    color: var(--white);
    padding: 0;
    width: 100%;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top bar: logo + title */
.site-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0 10px;
}

.site-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.site-title-wrap {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: 'PT Serif', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.site-title:hover { color: rgba(255,255,255,0.9); text-decoration: none; }

.site-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.3px;
    margin-top: 3px;
}

.issn-bar {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== MAIN NAVIGATION ===== */
.main-nav {
    background: rgba(0,0,0,0.15);
    width: 100%;
}

.main-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.main-menu > li > a {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 10px 12px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.main-menu > li > a:hover {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

.main-menu > li.active > a {
    background: rgba(255,255,255,0.25);
}

/* Sub-menu (dropdown) */
.main-menu > li {
    position: relative;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-bg);
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.main-menu > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.82rem;
    padding: 8px 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.sub-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

/* Language switcher on right */
.lang-switcher {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.lang-switcher li { position: relative; }

.lang-switcher .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    transition: all 0.2s;
}

.lang-switcher .dropdown-toggle:hover {
    background: rgba(255,255,255,0.25);
}

.lang-switcher .dropdown-arrow { font-size: 0.7rem; }

.lang-switcher .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-bg);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    min-width: 120px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.lang-switcher li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switcher .dropdown-menu a {
    display: block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.82rem;
    padding: 6px 14px;
    transition: background 0.15s;
}

.lang-switcher .dropdown-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

/* ===== MAIN CONTENT AREA ===== */
#main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ===== HOMEPAGE ===== */
.journal-hero {
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    padding: 32px;
    margin-bottom: 32px;
    border-left: 4px solid var(--accent-1);
}

.journal-hero h1 {
    font-family: 'PT Serif', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.journal-hero h2 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.journal-hero p { color: var(--text-muted); line-height: 1.7; }

.journal-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.journal-meta-item {
    display: flex;
    flex-direction: column;
}

.journal-meta-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.journal-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.journal-indexing {
    background: white;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.journal-indexing h3 {
    font-family: 'PT Serif', serif;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.indexing-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.indexing-badge {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===== LATEST ISSUES GRID ===== */
.issues-section { margin-bottom: 32px; }

.issues-section h2 {
    font-family: 'PT Serif', serif;
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== ISSUE CARD (blog-item) ===== */
.blog-list-container { width: 100%; }

.blog-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.blog-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.blog-item-info-wrapper {
    padding: 16px;
}

.blog-item-image-wrapper {
    background: var(--light-bg);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-item-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.issue-number-badge {
    background: var(--accent-5);
    color: white;
    font-family: 'PT Serif', serif;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 4px;
    text-align: center;
}

.blog-item-title-wrapper { margin-bottom: 8px; }

.blog-item-title {
    font-family: 'PT Serif', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    line-height: 1.3;
    display: block;
}

.blog-item-title:hover { color: var(--accent-5); }

.blog-item-publish {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-item-description {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== BLOG LIST PAGE ===== */
.blog-page-label {
    background: var(--accent-5);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 3px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.blog-list-container h1 {
    font-family: 'PT Serif', serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

/* ===== BLOG ARTICLE VIEW ===== */
.blog-article-content {
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 32px;
}

.blog-article-wrapper { width: 100%; }

.blog-article-category {
    display: inline-block;
    background: var(--accent-5);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.blog-article h1 {
    font-family: 'PT Serif', serif;
    font-size: 1.9rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.blog-breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-breadcrumbs a { color: var(--accent-5); text-decoration: none; }
.blog-breadcrumbs a:hover { text-decoration: underline; }

.blog-date-wrapper {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-description-wrapper {
    line-height: 1.7;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.blog-description-wrapper p { margin-bottom: 1rem; }
.blog-description-wrapper h2, .blog-description-wrapper h3 {
    font-family: 'PT Serif', serif;
    margin: 1.5rem 0 0.8rem;
    color: var(--text-dark);
}

.blog-description-wrapper a { color: var(--accent-5); }
.blog-description-wrapper a:hover { text-decoration: underline; }

.blog-description-wrapper ul, .blog-description-wrapper ol {
    margin: 1rem 0;
    padding-left: 2rem;
    list-style: disc;
}

.blog-description-wrapper li { margin-bottom: 0.4rem; }

/* Themify builder content from Wayback */
.blog-description-wrapper .tb_section { margin-bottom: 24px; }
.blog-description-wrapper .tb_column { margin-bottom: 16px; }

.blog-additional-info {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-author { margin-bottom: 8px; }
.blog-author-label { display: inline; font-weight: 600; }
.blog-author-name { display: inline; }

.blog-source-url-wrapper { margin-top: 8px; }

/* ===== CONTENT PAGES (About, Policy, etc.) ===== */
.main-content {
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 32px;
}

.main-content h1 {
    font-family: 'PT Serif', serif;
    font-size: 1.9rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.content-description {
    line-height: 1.7;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.content-description p { margin-bottom: 1rem; }

.content-description h1, .content-description h2, .content-description h3 {
    font-family: 'PT Serif', serif;
    margin: 1.5rem 0 0.8rem;
}

.content-description ul, .content-description ol {
    margin: 1rem 0;
    padding-left: 2rem;
    list-style: disc;
}

.content-description li { margin-bottom: 0.4rem; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark-bg);
    color: rgba(255,255,255,0.75);
    padding: 32px 20px;
    margin-top: 48px;
    font-size: 0.85rem;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
}

.footer-title {
    font-family: 'PT Serif', serif;
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 12px;
}

.footer-text { line-height: 1.7; color: rgba(255,255,255,0.65); }

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* ===== ERROR PAGE ===== */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.error-content { max-width: 500px; padding: 2rem; }

.error-code {
    font-family: 'PT Serif', serif;
    font-size: 6rem;
    font-weight: 700;
    color: var(--accent-5);
    margin-bottom: 1rem;
}

.error-title {
    font-family: 'PT Serif', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.error-message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-primary {
    background: var(--accent-5);
    color: white;
}

.btn-primary:hover {
    background: #3a4db0;
    color: white;
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background: #555;
    color: white;
}

/* ===== UTILITIES ===== */
.clear { clear: both; }
.d-n { display: none; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    list-style: none;
    gap: 6px;
    margin: 24px 0;
    padding: 0;
    flex-wrap: wrap;
}

.pagination li a, .pagination li span {
    display: block;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent-5);
    text-decoration: none;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s;
}

.pagination li.active span {
    background: var(--accent-5);
    color: white;
    border-color: var(--accent-5);
}

.pagination li a:hover {
    background: var(--accent-5);
    color: white;
    border-color: var(--accent-5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .main-nav-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    .main-menu {
        flex-wrap: wrap;
        padding: 0 10px;
    }

    .main-menu > li > a { padding: 8px 8px; font-size: 0.78rem; }

    .lang-switcher { padding: 4px 10px 8px; }

    #main { padding: 16px 12px; }

    .blog-article-content { padding: 20px 16px; }
    .main-content { padding: 20px 16px; }
    .journal-hero { padding: 20px 16px; }

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

    .contact-layout { grid-template-columns: 1fr; }
}

/* Contact page */
.site-contact h1 { font-family: 'PT Serif', serif; margin-bottom: 30px; }
.site-contact h2 { font-family: 'PT Serif', serif; font-size: 1.2rem; margin-bottom: 16px; color: #444; }

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-top: 10px;
}

.contact-info { background: #f9f9f9; border-left: 4px solid #33baab; padding: 24px; border-radius: 4px; }
.contact-details { list-style: none; padding: 0; margin: 16px 0 0; }
.contact-details li { padding: 6px 0; border-bottom: 1px solid #eee; font-size: 0.95rem; }
.contact-details li:last-child { border-bottom: none; }
.contact-label { font-weight: 600; margin-right: 6px; color: #555; }
.contact-details a { color: #33baab; text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-img img { border-radius: 4px; }
.contact-layout--single { grid-template-columns: 1fr; max-width: 600px; }
