/*
 * VELES Journal — Safe Baseline Stylesheet
 * Purpose: clean visual adjustments for OJS without scripts, imports, redirects,
 * external assets, data URIs, or executable content.
 *
 * Important:
 * - This file is presentation-only.
 * - Replacing a compromised stylesheet does not remove malware elsewhere.
 * - Review OJS core files, plugins, themes, database content, users, and server logs.
 */

/* =========================
   1. Base variables
   ========================= */
:root {
  --veles-primary: #1F3A68;
  --veles-primary-hover: #162B4E;
  --veles-accent: #2A7EC1;
  --veles-text: #222222;
  --veles-muted: #5F6773;
  --veles-border: #D9DEE7;
  --veles-bg-soft: #F6F8FB;
  --veles-white: #FFFFFF;
}

/* =========================
   2. Base typography
   ========================= */
body {
  color: var(--veles-text);
  background: var(--veles-white);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--veles-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--veles-primary-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* =========================
   3. Headings
   ========================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--veles-primary);
  line-height: 1.3;
}

h1,
h2,
h3 {
  font-weight: 700;
}

h4,
h5,
h6 {
  font-weight: 600;
}

/* =========================
   4. Header and navigation
   ========================= */
.pkp_site_name,
.pkp_site_name_wrapper {
  background: var(--veles-white);
}

.pkp_navigation_primary > li > a {
  color: var(--veles-primary);
  font-weight: 600;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
  color: var(--veles-primary-hover);
}

.pkp_navigation_primary ul {
  background: var(--veles-white);
  border: 1px solid var(--veles-border);
}

.pkp_navigation_primary ul a {
  color: var(--veles-text);
}

.pkp_navigation_primary ul a:hover,
.pkp_navigation_primary ul a:focus {
  color: var(--veles-primary);
  background: var(--veles-bg-soft);
}

/* =========================
   5. Main content
   ========================= */
.pkp_structure_main {
  color: var(--veles-text);
}

.page_title,
.cmp_page_list .title,
.obj_article_details .page_title {
  color: var(--veles-primary);
}

.pkp_page_index .homepage_image img {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================
   6. Buttons
   ========================= */
.cmp_button,
button,
input[type="submit"],
input[type="button"] {
  background: var(--veles-primary);
  color: var(--veles-white);
  border: 1px solid var(--veles-primary);
  border-radius: 4px;
  font-weight: 600;
}

.cmp_button:hover,
.cmp_button:focus,
button:hover,
button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
input[type="button"]:hover,
input[type="button"]:focus {
  background: var(--veles-primary-hover);
  border-color: var(--veles-primary-hover);
  color: var(--veles-white);
}

/* =========================
   7. Forms
   ========================= */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  border: 1px solid var(--veles-border);
  border-radius: 4px;
  background: var(--veles-white);
  color: var(--veles-text);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--veles-accent);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px rgba(42, 126, 193, 0.18);
}

/* =========================
   8. Article and issue lists
   ========================= */
.obj_article_summary,
.obj_issue_summary {
  border-bottom: 1px solid var(--veles-border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.obj_article_summary .title a,
.obj_issue_summary .title a {
  color: var(--veles-primary);
  font-weight: 700;
}

.obj_article_summary .meta,
.obj_article_summary .authors,
.obj_issue_summary .description {
  color: var(--veles-muted);
}

/* =========================
   9. Sidebar
   ========================= */
.pkp_structure_sidebar .block {
  border: 1px solid var(--veles-border);
  background: var(--veles-white);
  margin-bottom: 1rem;
  padding: 1rem;
}

.pkp_structure_sidebar .title {
  color: var(--veles-primary);
  font-weight: 700;
}

/* =========================
   10. Tables
   ========================= */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--veles-border);
  padding: 0.65rem;
  vertical-align: top;
}

th {
  color: var(--veles-primary);
  background: var(--veles-bg-soft);
}

/* =========================
   11. Footer
   ========================= */
.pkp_structure_footer_wrapper {
  background: var(--veles-primary);
  color: var(--veles-white);
}

.pkp_structure_footer_wrapper a {
  color: var(--veles-white);
}

.pkp_structure_footer_wrapper a:hover,
.pkp_structure_footer_wrapper a:focus {
  color: var(--veles-white);
  text-decoration: underline;
}

/* =========================
   12. VELES custom content blocks
   ========================= */
.veles-policies,
.veles-guides {
  color: var(--veles-text);
}

.veles-policies h3,
.veles-policies h4,
.veles-guides h3,
.veles-guides h4 {
  color: var(--veles-primary);
}

.veles-policies .toc,
.veles-guides .toc {
  border: 1px solid var(--veles-border);
  border-radius: 6px;
  background: var(--veles-white);
  margin: 1rem 0 1.5rem;
  overflow: hidden;
}

.veles-policies .toc .hd,
.veles-guides .toc .hd {
  background: var(--veles-primary);
  color: var(--veles-white);
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.veles-policies .toc ul,
.veles-guides .toc ul {
  margin: 0;
  padding: 1rem 1rem 1rem 2rem;
}

/* =========================
   13. Accessibility
   ========================= */
:focus-visible {
  outline: 3px solid var(--veles-accent);
  outline-offset: 2px;
}

.screen-reader-text,
.pkp_screen_reader {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   14. Responsive behavior
   ========================= */
@media (max-width: 768px) {
  .pkp_structure_content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pkp_navigation_primary > li > a {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

/* End of safe baseline stylesheet */
