/* Layout details Ignite's theme system doesn't cover: the centred masthead,
   the blog roll spacing, tag pills, and the alternating apps list. */

.site-header {
  padding-top: 20px;
  position: relative;
}

.site-logo-link {
  position: absolute;
  left: 20px;
  top: 20px;
}

.site-logo-link img {
  transition: transform 0.2s ease-in-out;
}

.site-logo-link img:hover {
  transform: scale(1.05);
}

@media (max-width: 767px) {
  .site-logo-link {
    position: static;
    display: block;
    margin-bottom: 10px;
  }
}

.site-title {
  display: block;
  font-weight: bold;
  font-size: 2.5rem;
  line-height: 1.1;
  text-decoration: none;
}

.site-subtitle {
  font-weight: 500;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--bs-secondary-color);
  margin-bottom: 20px;
}

.site-nav {
  margin: 10px 0 40px 0;
}

.site-nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  margin: 0 8px;
  text-decoration: none;
}

/* Blog roll */

.post-list {
  max-width: min(90%, 850px);
  margin: 0 auto;
}

.post-list-item {
  margin-bottom: 60px;
}

.post-title {
  display: block;
  font-weight: bold;
  font-size: 2.2rem;
  line-height: 1.1;
  margin-bottom: 0.2em;
  text-decoration: none;
}

.post-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.09em;
}

.post-date,
.article-date {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.6em;
}

.post-read-more {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}

/* Articles */

.content {
  line-height: 1.5;
  max-width: min(90%, 850px);
  margin: 0 auto 40px auto;
}

.article-title {
  text-align: center;
  font-size: 2.6rem;
  line-height: 1.1;
  margin-bottom: 0.2em;
}

.article-date {
  text-align: center;
}

.article-body img,
.content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 0 auto 1.5em auto;
}

.article-body pre code {
  display: block;
  border-radius: 14px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

/* Tags */

.tag-list {
  margin-bottom: 20px;
}

a.tag,
.tag {
  display: inline-block;
  background-color: #275f45;
  color: #fcfafa;
  padding: 4px 8px;
  border-radius: 5px;
  margin: 4px 5px 4px 0;
  text-decoration: none;
  font-size: 0.85rem;
}

.browse-all {
  display: block;
  margin-bottom: 30px;
}

/* Apps */

#apps-list {
  max-width: min(90%, 1000px);
  margin: 0 auto;
}

.app-row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 80px;
}

.app-row.reverse {
  flex-direction: row-reverse;
}

.app-details {
  flex: 1 1 55%;
  min-width: 0;
  position: sticky;
  top: 40px;
}

/* Screenshot tables are wider than a phone; let them scroll on their own
   rather than pushing the whole page sideways. */
.app-description,
.content .table-responsive-wrapper {
  overflow-x: auto;
}

.app-description table,
.content table {
  max-width: none;
}

.app-title {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.4em;
  text-decoration: none;
}

.app-image {
  flex: 0 0 auto;
  max-width: min(35%, 400px);
  height: auto;
  align-self: flex-start;
  border-radius: 14px;
}

.app-description img {
  border-radius: 14px;
}

.app-description table {
  border-collapse: collapse;
}

.app-description td {
  padding: 4px;
}

@media (max-width: 844px) {
  .app-row,
  .app-row.reverse {
    flex-direction: column;
    align-items: stretch;
  }

  .app-details {
    flex: 0 0 auto;
    width: 100%;
    position: static;
  }

  .app-image {
    flex: 0 0 auto;
    max-width: 70%;
    align-self: center;
  }
}

/* Footer */

.footer-content {
  width: 85%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--bs-secondary-color);
  margin: 40px auto 0 auto;
  padding-bottom: 40px;
  font-size: 0.85rem;
}

.social-icons a {
  margin-left: 12px;
  font-size: 1.2rem;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  a.tag,
  .tag {
    background-color: #4f9e78;
    color: #1c1c1e;
  }
}
