/* Payment Theme Stylesheet - Modern POS and Payment Devices */

:root {
  --primary: #0d6efd;
  --primary-hover: #0b5ed7;
  --text-main: #131313;
  --text-header: #3f3f3f;
  --text-muted: #707070;
  --bg-color: #ffffff;
  --bg-subtle: #f8f9fa;
  --border-color: #e9ecef;
  --card-border: #e0e0e0;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.12);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding-top: 64px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--primary);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header and Navigation */
.site-header {
  position: relative;
}

.navbar.fixed-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark-wrapper .brand-link {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.mark-wrapper .brand-link:hover {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-header);
  padding: 0.5rem 0.25rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Banner */
.banner-wrapper {
  width: 100%;
  overflow: hidden;
  background-color: #f1f3f5;
}

.site-banner {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

/* Main Container */
.main-content-container {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
  min-height: calc(100vh - 200px);
}

/* Cards and Index Posts */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-item {
  width: 100%;
}

.index-post-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.index-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: #d0d7de;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.card-title a {
  color: var(--text-main);
}

.card-title a:hover {
  color: var(--primary);
}

.card-taxonomies {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.tax-label {
  color: var(--text-muted);
  font-weight: 500;
}

/* Category and Tag Badges */
.tag,
.badge {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  border-left: 3px solid var(--primary);
  padding-left: 6px;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.tag:hover,
.badge:hover {
  color: var(--primary);
}

.card-summary {
  color: var(--text-header);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: auto;
}

.read-more:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
}

.pagination-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.pagination-inner .page-link {
  color: var(--primary);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.pagination-inner .page-link:hover {
  background-color: var(--bg-subtle);
}

.pagination-inner .current {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
  font-weight: 600;
}

/* Single Post Page */
.post-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 2.5rem;
}

.post-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.post-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-toc {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.article-toc ul {
  padding-left: 1.5rem;
  margin: 0;
}

.article-toc li {
  margin: 0.25rem 0;
}

/* Markdown Content Styling */
.markdown-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-main);
  word-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.markdown-body h1 { font-size: 1.75rem; }
.markdown-body h2 { font-size: 1.45rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border-color); }
.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.1rem; }

.markdown-body p {
  margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.75rem;
  margin-bottom: 1rem;
}

.markdown-body li {
  margin-bottom: 0.35rem;
}

.markdown-body blockquote {
  border-left: 4px solid var(--primary);
  background-color: var(--bg-subtle);
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  color: var(--text-header);
  border-radius: 0 4px 4px 0;
}

.markdown-body code {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.markdown-body pre {
  background-color: #212529;
  color: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.markdown-body pre code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.85rem;
  text-align: left;
}

.markdown-body th {
  background-color: var(--bg-subtle);
  font-weight: 600;
}

/* Post Footer and Taxonomies */
.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.taxonomy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.taxonomy-label {
  font-weight: 600;
  color: var(--text-header);
}

/* Article Navigation */
.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  gap: 1.5rem;
}

.article-nav a {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-subtle);
  transition: all 0.2s ease;
  max-width: 48%;
}

.article-nav a:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.article-nav a span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-nav a strong {
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-nav .post-nav-next {
  margin-left: auto;
  text-align: right;
}

/* Archives and List Pages */
.list-header {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
  color: var(--text-main);
}

.term-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.term-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.term-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.term-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.archive-year {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}

.archive-year-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-header);
}

.archive-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.archive-post-item:last-child {
  border-bottom: none;
}

.archive-post-link {
  color: var(--text-main);
  font-size: 0.95rem;
}

.archive-post-link:hover {
  color: var(--primary);
}

.archive-post-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 1rem;
  white-space: nowrap;
}

.empty-state {
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem 0;
  text-align: center;
}

/* Floating Back to Top Button */
.btn-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
  z-index: 999;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-top:hover {
  background-color: var(--primary);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

/* Footer */
.footer-wrapper {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  body {
    padding-top: 56px;
  }

  .navbar.fixed-nav {
    height: 56px;
  }

  .nav-container {
    gap: 0.75rem;
  }

  .mark-wrapper .brand-link {
    font-size: 1.15rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .main-content-container {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }

  .index-post-card {
    padding: 1.25rem;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .post-wrapper {
    padding: 1.5rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .article-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .article-nav a {
    max-width: 100%;
  }

  .article-nav .post-nav-next {
    text-align: left;
  }

  .btn-top {
    right: 1.25rem;
    bottom: 1.25rem;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
}
