/* Ayrampu — estilo inspirado en OJS 3 Default Theme */
:root {
  --bg: #fff;
  --bg-shade: #ddd;
  --bg-base: #1e6292;
  --primary: #006798;
  --primary-lift: #007bb5;
  --text: #222;
  --text-muted: #555;
  --text-on-base: #fff;
  --border: #ddd;
  --font: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-heading: "Noto Serif", Georgia, "Times New Roman", serif;
  --max-width: 1160px;
  --sidebar-width: 30%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--primary-lift);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header OJS */
.pkp_structure_head {
  background: var(--bg-base);
  color: var(--text-on-base);
}

.pkp_head_wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

.pkp_site_name {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
}

.pkp_site_name a {
  color: var(--text-on-base);
  text-decoration: none;
}

.pkp_site_name a:hover {
  text-decoration: underline;
  color: var(--text-on-base);
}

.pkp_site_subtitle {
  display: block;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 400;
  margin-top: 0.25rem;
  opacity: 0.9;
}

.pkp_navigation_user_wrapper {
  text-align: right;
  margin-bottom: 0.5rem;
}

.pkp_navigation_user {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 1rem;
}

.pkp_navigation_user a {
  color: var(--text-on-base);
  font-size: 0.875rem;
}

.pkp_navigation_primary_row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 0.75rem;
}

.pkp_navigation_primary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.pkp_navigation_primary a {
  color: var(--text-on-base);
  font-size: 0.9375rem;
  font-weight: 600;
}

.pkp_navigation_primary a:hover,
.pkp_navigation_primary a[aria-current="page"] {
  text-decoration: underline;
  color: var(--text-on-base);
}

.pkp_search {
  display: flex;
  gap: 0.25rem;
}

.pkp_search input[type="search"] {
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  font-size: 0.875rem;
  min-width: 140px;
}

.pkp_search button {
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--text-on-base);
  cursor: pointer;
  font-size: 0.875rem;
  border-radius: 2px;
}

.pkp_search button:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Layout */
.pkp_structure_content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.pkp_structure_main {
  flex: 1 1 60%;
  min-width: 0;
}

.pkp_structure_sidebar {
  flex: 0 0 var(--sidebar-width);
  min-width: 240px;
}

@media (max-width: 991px) {
  .pkp_structure_sidebar {
    flex: 1 1 100%;
  }
}

/* Blocks sidebar */
.pkp_block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.pkp_block:last-child {
  border-bottom: none;
}

.pkp_block h2 {
  font-family: var(--font);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.pkp_block ul {
  margin: 0;
  padding-left: 1.25rem;
}

.pkp_block p {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
}

/* Main content sections */
.page_title {
  margin-top: 0;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.section_label {
  font-family: var(--font);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

.home_block {
  margin-bottom: 2.5rem;
}

.home_block h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.issue_heading {
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
}

.issue_meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.issue_dossier {
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* TOC OJS style */
.obj_issue_toc .section {
  margin-bottom: 1.5rem;
}

.obj_issue_toc .section h3 {
  font-family: var(--font);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

.obj_article_summary {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dotted var(--border);
}

.obj_article_summary:last-child {
  border-bottom: none;
}

.obj_article_summary .title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  margin: 0 0 0.25rem;
}

.obj_article_summary .authors {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.obj_article_summary .pages {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.galleys_links {
  margin-top: 0.35rem;
  font-size: 0.875rem;
}

.galleys_links a {
  margin-right: 0.75rem;
}

.galleys_links a::before {
  content: "▸ ";
  color: var(--text-muted);
}

/* Article detail */
.article_detail .title {
  font-size: 1.5rem;
  margin-top: 0;
}

.article_detail .authors {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.article_detail .affiliation {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article_galleys {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f7f7f7;
  border: 1px solid var(--border);
}

.article_galleys a {
  display: inline-block;
  margin-right: 1rem;
  font-weight: 600;
}

.article_keywords {
  margin-top: 1rem;
}

.article_keywords span {
  display: inline-block;
  background: #eee;
  padding: 0.15rem 0.5rem;
  margin: 0.25rem 0.25rem 0 0;
  font-size: 0.8125rem;
  border-radius: 2px;
}

.citation {
  margin-top: 2rem;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 3px solid var(--bg-base);
  font-size: 0.9375rem;
}

/* Galley HTML (texto completo desde PDF) */
.article_html_galley .article-html-body {
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.65;
  text-align: justify;
}

.article_html_galley .article-html-body p {
  margin: 0 0 1rem;
  text-indent: 1.5em;
}

.article_html_galley .article-html-body p:first-child {
  text-indent: 0;
}

.article_html_galley .article-html-page {
  margin-bottom: 1.5rem;
}

.article_html_galley .article-verse p {
  text-indent: 0;
  margin: 0.35rem 0;
  text-align: left;
  font-style: italic;
}

/* Jerarquía tipográfica desde PDF (vol. 2+) */
.article-html-body--from-pdf .article-pdf-h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 1.75rem 0 0.75rem;
  text-align: left;
  text-indent: 0;
}

.article-html-body--from-pdf .article-pdf-h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  text-indent: 0;
}

.article-html-body--from-pdf .article-pdf-h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.35rem;
  text-indent: 0;
  letter-spacing: 0.01em;
}

.article-html-body--from-pdf .article-pdf-subtitle {
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
  text-indent: 0;
  margin: 0.25rem 0 1.25rem;
  color: var(--text-muted);
}

.article-html-body--from-pdf > .article-html-page:first-child .article-pdf-h1:first-child {
  margin-top: 0;
}

/* Announcements */
.cmp_announcements .announcement {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cmp_announcements .announcement h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.cmp_announcements .date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Archive list */
.archive_year {
  margin-bottom: 2rem;
}

.archive_year h2 {
  font-size: 1.125rem;
  border-bottom: 2px solid var(--bg-base);
  padding-bottom: 0.25rem;
}

.archive_issue {
  margin: 0.75rem 0 0.75rem 1rem;
}

/* Search */
.search_form {
  background: #f7f7f7;
  padding: 1.25rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.search_form .form_row {
  margin-bottom: 1rem;
}

.search_form label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.search_form input,
.search_form select {
  width: 100%;
  max-width: 400px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  font-family: inherit;
}

.search_results table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.search_results th,
.search_results td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.search_results th {
  background: #f0f0f0;
  font-size: 0.8125rem;
  text-transform: uppercase;
}

.search_results .no_results {
  color: var(--text-muted);
  font-style: italic;
}

/* Footer */
.pkp_structure_footer {
  background: var(--bg-shade);
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pkp_structure_footer_wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
}

.pkp_footer_content p {
  margin: 0 0 0.5rem;
}

.pkp_brand_footer {
  margin-top: 1rem;
  font-size: 0.8125rem;
  opacity: 0.8;
}

/* Utility */
.btn_link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
}

.subpages_list {
  list-style: none;
  padding: 0;
}

.subpages_list li {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dotted var(--border);
}

.content_page h2 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
}

.content_page ul,
.content_page ol {
  padding-left: 1.5rem;
}

.content_page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.content_page th,
.content_page td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.issue_cover {
  max-width: 200px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #1e6292 0%, #006798 100%);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.about_index {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.about_index li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.about_index li:last-child {
  border-bottom: none;
}

.about_index a {
  font-size: 1.05rem;
}
