/* MARYT Blog - front-end styles. Everything is scoped under .maryt-blog. */

.maryt-blog .content-header {
  padding: 1.25rem 0 0.75rem;
}

.maryt-blog .content-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

.maryt-blog .content {
  padding-bottom: 2rem;
}

/* Cards on the article list */
.maryt-blog-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.maryt-blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
}

.maryt-blog-cover {
  display: block;
  overflow: hidden;
  background: #f1f3f5;
  aspect-ratio: 16 / 9;
}

.maryt-blog-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.maryt-blog-card-title {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  line-height: 1.45;
}

.maryt-blog-card-title a {
  color: #212529;
  text-decoration: none;
}

.maryt-blog-card-title a:hover {
  color: #0d6efd;
}

.maryt-blog-card .maryt-blog-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 1rem;
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.maryt-blog-meta {
  margin-bottom: 0.5rem;
  color: #868e96;
  font-size: 0.85rem;
}

.maryt-blog-meta time {
  margin-right: 0.5rem;
}

.maryt-blog-category {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  color: #495057;
  font-size: 0.78rem;
  background: #e9ecef;
  border-radius: 0.75rem;
}

/* Article / page body */
.maryt-blog-article > .card-body {
  padding: 1.5rem 1.75rem;
}

.maryt-blog-article-cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.maryt-blog-content {
  color: #343a40;
  font-size: 1rem;
  line-height: 1.85;
  word-wrap: break-word;
}

.maryt-blog-content h2,
.maryt-blog-content h3,
.maryt-blog-content h4,
.maryt-blog-content h5,
.maryt-blog-content h6 {
  margin: 1.75rem 0 0.75rem;
  color: #212529;
  font-weight: 600;
  line-height: 1.4;
}

.maryt-blog-content h2 { font-size: 1.5rem; }
.maryt-blog-content h3 { font-size: 1.3rem; }
.maryt-blog-content h4 { font-size: 1.15rem; }

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

.maryt-blog-content ul,
.maryt-blog-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.maryt-blog-content li {
  margin-bottom: 0.35rem;
}

.maryt-blog-content a {
  color: #0d6efd;
  text-decoration: none;
}

.maryt-blog-content a:hover {
  text-decoration: underline;
}

.maryt-blog-content strong {
  font-weight: 600;
}

.maryt-blog-content blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  color: #495057;
  background: #f8f9fa;
  border-left: 4px solid #adb5bd;
  border-radius: 0 0.25rem 0.25rem 0;
}

.maryt-blog-content blockquote p:last-child {
  margin-bottom: 0;
}

.maryt-blog-content pre {
  position: relative;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  overflow: auto;
  color: #e9ecef;
  font-size: 0.88rem;
  line-height: 1.6;
  background: #212529;
  border-radius: 0.375rem;
  -webkit-overflow-scrolling: touch;
}

.maryt-blog-content pre code {
  padding: 0;
  color: inherit;
  font-size: inherit;
  background: transparent;
}

.maryt-blog-content code {
  padding: 0.15rem 0.35rem;
  color: #c7254e;
  font-size: 0.88em;
  background: #f1f3f5;
  border-radius: 0.25rem;
}

.maryt-blog-content hr {
  margin: 2rem 0;
  border-top: 1px solid #dee2e6;
}

.maryt-blog-content figure {
  margin: 1.25rem 0;
}

.maryt-blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

.maryt-blog-content table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.maryt-blog-content th,
.maryt-blog-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
}

.maryt-blog-content thead th {
  background: #f8f9fa;
}

.maryt-blog-actions {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f5;
}

.maryt-blog-pagination {
  margin: 1rem 0 2rem;
}

.maryt-blog-copy {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  padding: 0.1rem 0.5rem;
  color: #ced4da;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.maryt-blog-content pre:hover .maryt-blog-copy,
.maryt-blog-copy:focus {
  opacity: 1;
}

/* Dark mode used by the default theme (body.dark_mode) */
.dark_mode .maryt-blog-card {
  background: #2f3237;
  border-color: rgba(255, 255, 255, 0.08);
}

.dark_mode .maryt-blog-card-title a {
  color: #f1f3f5;
}

.dark_mode .maryt-blog-card .maryt-blog-excerpt,
.dark_mode .maryt-blog-meta {
  color: #adb5bd;
}

.dark_mode .maryt-blog-category {
  color: #dee2e6;
  background: rgba(255, 255, 255, 0.08);
}

.dark_mode .maryt-blog-content {
  color: #dee2e6;
}

.dark_mode .maryt-blog-content h2,
.dark_mode .maryt-blog-content h3,
.dark_mode .maryt-blog-content h4,
.dark_mode .maryt-blog-content h5,
.dark_mode .maryt-blog-content h6 {
  color: #f1f3f5;
}

.dark_mode .maryt-blog-content blockquote {
  color: #ced4da;
  background: rgba(255, 255, 255, 0.04);
  border-left-color: #495057;
}

.dark_mode .maryt-blog-content code {
  color: #f1aeb5;
  background: rgba(255, 255, 255, 0.08);
}

.dark_mode .maryt-blog-content th,
.dark_mode .maryt-blog-content td {
  border-color: #495057;
}

.dark_mode .maryt-blog-content thead th {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 767.98px) {
  .maryt-blog-article > .card-body {
    padding: 1rem;
  }

  .maryt-blog .content-header h1 {
    font-size: 1.4rem;
  }
}
