/**
 * HTML Article Galley Default Stylesheet
 * Soziales Kapital Theme
 *
 * Matches the professional typesetting style of newer articles:
 * - Roboto for body text and headings
 * - Crimson Pro for article metadata header
 * - Justified text with automatic hyphenation
 */

/* Base typography */
body {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.6;
  color: #000;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  max-width: 725px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 0;
}

/* Paragraphs - justified with hyphenation */
p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  margin-bottom: 1em;
}

/* Article metadata header (first section with citation info) */
.article-header,
.citation,
.article-meta,
body > p:first-of-type,
body > div:first-of-type > p:first-of-type {
  font-family: 'Crimson Pro', 'Minion Pro', Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: #333;
  text-align: left;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-top: 3px solid #c45a00;
  padding-top: 1rem;
}

.article-header a,
.citation a,
.article-meta a,
body > p:first-of-type a {
  color: #c45a00;
  text-decoration: none;
}

.article-header a:hover,
.citation a:hover,
.article-meta a:hover,
body > p:first-of-type a:hover {
  text-decoration: underline;
}

/* Headings - all Roboto */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: #000;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  text-align: left;
}

h1 {
  font-size: 1.75rem;
  margin-top: 2rem;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1.1rem;
}

h5, h6 {
  font-size: 1rem;
}

/* Article title and subtitle */
.article-title,
h1:first-of-type {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}

.article-subtitle {
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Author name */
.author,
.authors {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  font-weight: 400;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* Section headings (Zusammenfassung, Abstract, etc.) */
.abstract h2,
.abstract h3,
h2.abstract-title,
h3.abstract-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* Keywords/Schlagworte */
.keywords,
.schlagworte {
  font-size: 16.5px;
  margin: 1.5rem 0;
}

.keywords strong,
.schlagworte strong {
  font-weight: 700;
}

/* Links */
a {
  color: #c45a00;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin: 1em 0;
  padding-left: 1.5em;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

/* Blockquotes */
blockquote {
  margin: 1.5em 0;
  margin-left: 2em;
  padding-left: 1em;
  border-left: 2px solid #ccc;
  font-style: italic;
}

blockquote p {
  margin-bottom: 0.5em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
}

th, td {
  padding: 0.5em;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  font-weight: 700;
  background-color: #f5f5f5;
}

/* Images and figures */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 1.5em 0;
}

figcaption {
  font-size: 14px;
  color: #666;
  margin-top: 0.5em;
  text-align: left;
}

/* Code */
code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
}

pre {
  background-color: #f5f5f5;
  padding: 1em;
  overflow-x: auto;
  margin: 1.5em 0;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2em 0;
}

/* Footnotes */
.footnotes,
.endnotes,
#footnotes {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #ddd;
  font-size: 14px;
}

.footnotes ol,
.endnotes ol {
  padding-left: 1.5em;
}

.footnotes li,
.endnotes li {
  margin-bottom: 0.75em;
}

/* Superscript footnote references */
sup {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: super;
}

sup a {
  text-decoration: none;
}

/* References/Bibliography */
.references,
.bibliography,
.literatur {
  margin-top: 2em;
}

.references h2,
.bibliography h2,
.literatur h2 {
  font-size: 1.1rem;
  margin-bottom: 1em;
}

.references p,
.bibliography p,
.literatur p {
  font-size: 15px;
  margin-bottom: 0.75em;
  padding-left: 2em;
  text-indent: -2em;
  text-align: left;
}

/* Print styles */
@media print {
  body {
    font-size: 12pt;
    margin-left: 0;
    max-width: none;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  p, blockquote, figure, table {
    page-break-inside: avoid;
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  body {
    margin-left: 10px;
    margin-right: 10px;
    max-width: none;
    padding: 1.5rem 0;
  }
}

@media (max-width: 600px) {
  body {
    margin-left: 15px;
    margin-right: 15px;
    font-size: 15px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }
}
