/* Public CMS pages: /blog, /services */

.cms-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  width: 100%;
  box-sizing: border-box;
}

.cms-article-shell {
  min-width: 0;
}

.cms-list-header {
  margin-bottom: 32px;
}

.cms-list-header h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cms-list-header p {
  font-size: 16px;
  color: #555;
}

.cms-empty {
  color: #888;
  font-size: 15px;
  padding: 24px 0;
}

.cms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.cms-card {
  background: #fff;
  border: 1px solid #e5e3df;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cms-card-img-wrap { display: block; }
.cms-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.cms-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cms-card-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.cms-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.cms-card-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.cms-card-title a:hover { color: #1557d6; }

.cms-card-excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

.cms-card-read-more {
  font-size: 14px;
  font-weight: 600;
  color: #1557d6;
  text-decoration: none;
}

/* ── Article page ── */
.cms-article-viewbox {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.cms-article {
  background: #fff;
  border: 1px solid #e5e3df;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cms-breadcrumb {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

.cms-breadcrumb a { color: #1557d6; text-decoration: none; }
.cms-breadcrumb span { margin: 0 4px; }

.cms-article-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.cms-article-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 24px;
}

.cms-article-hero-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 28px;
}

.cms-video-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin-bottom: 28px;
  border-radius: 8px;
  overflow: hidden;
}

.cms-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Rich body content styles */
.cms-article-body {
  line-height: 1.7;
  font-size: 16px;
  color: #1a1a1a;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.cms-article-body h2 { font-size: 24px; font-weight: 700; margin: 28px 0 12px; }
.cms-article-body h3 { font-size: 20px; font-weight: 600; margin: 22px 0 10px; }
.cms-article-body p  { margin-bottom: 16px; }
.cms-article-body ul,
.cms-article-body ol { margin: 0 0 16px 24px; }
.cms-article-body li { margin-bottom: 6px; }
.cms-article-body a  { color: #1557d6; }
.cms-article-body strong { font-weight: 700; }
.cms-article-body img,
.cms-article-body video,
.cms-article-body iframe {
  max-width: 100%;
  height: auto;
}
.cms-article-body img { border-radius: 6px; margin: 12px 0; }
.cms-article-body table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
}
.cms-article-body blockquote {
  border-left: 3px solid #e5e3df;
  margin: 20px 0;
  padding: 8px 20px;
  color: #555;
  font-style: italic;
}

@media (max-width: 640px) {
  .cms-shell {
    padding: 20px 12px 56px;
  }

  .cms-article {
    padding: 20px 16px;
    border-radius: 8px;
  }

  .cms-article-title {
    font-size: 24px;
  }

  .cms-article-body h2 { font-size: 20px; }
  .cms-article-body h3 { font-size: 17px; }
}
