/* come.mn Ghost Theme — screen.css */

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

:root {
  --blue:        #1a73e8;
  --blue-dark:   #1557b0;
  --green:       #2e9e57;
  --green-dark:  #1e7a42;
  --orange:      #f5a623;
  --orange-dark: #d4891a;
  --teal:        #00a896;
  --gray-light:  #f4f6fb;
  --gray-border: #e2e8f0;
  --text:        #1a202c;
  --text-muted:  #718096;
  --white:       #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 0px;
  --radius-sm: 0px;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  background: #e8eaf0;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── SITE WRAPPER ── */
.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
}

/* ── NAVBAR ── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f5a623, #2e9e57);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.logo span { color: var(--blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a:hover,
.nav-links a.active { background: var(--gray-light); color: var(--blue); }

.nav-search {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 0;
  color: var(--text-muted);
  font-size: 18px;
  transition: background 0.2s;
}
.nav-search:hover { background: var(--gray-light); }

/* ── SEARCH OVERLAY ── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}
.search-overlay.open { display: flex; }
.search-inner {
  background: var(--white);
  display: flex;
  gap: 0;
  width: 560px;
  max-width: 90vw;
}
.search-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid var(--blue);
  border-right: none;
  outline: none;
  font-family: 'Roboto', sans-serif;
}
.search-close {
  padding: 14px 18px;
  background: var(--blue);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 16px;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #1976d2 70%, #0288d1 100%);
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 {
  font-size: 36px;
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-content p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  max-width: 400px;
  line-height: 1.7;
}
.hero-image {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image img {
  border-radius: 0;
  max-height: 220px;
  object-fit: cover;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}
.hero-placeholder {
  width: 100%;
  height: 220px;
  background: rgba(255,255,255,0.1);
  border: 2px dashed rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}
.hero-placeholder .emoji { font-size: 48px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
}
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(245,166,35,0.4); }
.btn-blue   { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-green  { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); }
.btn-dark   { background: #2d3748; color: var(--white); }
.btn-dark:hover { background: #1a202c; }
.btn-teal   { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: #008577; }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ── SECTIONS ── */
.section { padding: 48px 40px; }
.section-gray { background: var(--gray-light); }
.section-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 24px;
}

/* ── CATEGORY GRID ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cat-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-4px); }
.cat-card-img { width: 100%; height: 140px; object-fit: cover; }
.cat-card-img-placeholder {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.cat-card-body { padding: 16px; }
.cat-card-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.cat-card-body p  { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }

/* ── TAG BAR ── */
.tag-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 40px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
}
.tag {
  padding: 7px 16px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--gray-border);
  background: var(--white);
  color: var(--text);
  transition: all 0.2s;
}
.tag:hover { border-color: var(--blue); color: var(--blue); }
.tag.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ── POSTS GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-4px); }
.post-card-image-link { display: block; }
.post-card-img { width: 100%; height: 160px; object-fit: cover; }
.post-card-img-placeholder {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.post-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.post-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--blue); }
.post-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── LOAD MORE ── */
.load-more-wrap { text-align: center; margin-top: 32px; }

/* ── TABS ── */
.tab-header {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 2px solid var(--gray-border);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active, .tab-btn:first-child { color: var(--text); border-bottom-color: var(--blue); }
.tab-btn.tab-green { color: var(--green); }
.tab-btn.tab-teal  { color: var(--teal); }
.tab-dot { color: var(--orange); margin: 0 4px; }

/* ── COLOUR HELPERS ── */
.bg-ai        { background: linear-gradient(135deg, #667eea, #764ba2); }
.bg-digital   { background: linear-gradient(135deg, #11998e, #38ef7d); }
.bg-stem      { background: linear-gradient(135deg, #4776e6, #8e54e9); }
.bg-equipment { background: linear-gradient(135deg, #f7971e, #ffd200); }

/* ── FOOTER ── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-border);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.social-links { display: flex; gap: 12px; }
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--gray-light);
  color: var(--text-muted);
  transition: all 0.2s;
}
.social-btn:hover { background: var(--blue); color: var(--white); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cat-card { animation: fadeUp 0.4s ease both; }
.cat-card:nth-child(1) { animation-delay: 0.05s; }
.cat-card:nth-child(2) { animation-delay: 0.10s; }
.cat-card:nth-child(3) { animation-delay: 0.15s; }
.cat-card:nth-child(4) { animation-delay: 0.20s; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .category-grid, .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding: 40px 20px; }
  .hero-image { display: none; }
  .section { padding: 32px 20px; }
  .tag-bar { padding: 16px 20px; }
  .category-grid, .posts-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 20px; text-align: center; }
}

/* ── GHOST REQUIRED: kg-width classes ── */
.kg-width-wide {
  grid-column: wide-start / wide-end;
  width: 100%;
}
.kg-width-full {
  grid-column: full-start / full-end;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.kg-width-default {
  grid-column: main-start / main-end;
}

/* ── POST LAYOUT GRID ── */
.gh-content {
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, auto)
    [wide-start] minmax(0, auto)
    [main-start] min(720px, calc(100% - 80px)) [main-end]
    minmax(0, auto) [wide-end]
    minmax(0, auto) [full-end];
  row-gap: 28px;
}
.gh-content > * {
  grid-column: main-start / main-end;
}
.gh-content > .kg-width-wide {
  grid-column: wide-start / wide-end;
}
.gh-content > .kg-width-full {
  grid-column: full-start / full-end;
}

/* ── POST HEADER ── */
.post-header {
  background: var(--gray-light);
  border-bottom: 1px solid var(--gray-border);
}
.post-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 40px 40px;
}
.post-header .post-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  display: inline-block;
}
.post-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.post-feature-image img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}
.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 40px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}
.post-content h2 { font-size: 26px; font-weight: 700; margin: 32px 0 12px; }
.post-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 10px; }
.post-content p  { margin-bottom: 20px; }
.post-content img { width: 100%; margin: 24px 0; }
.post-content a  { color: var(--blue); text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid var(--blue);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--gray-light);
  font-style: italic;
  color: var(--text-muted);
}
.post-content pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 20px;
  overflow-x: auto;
  font-size: 14px;
  margin: 24px 0;
}
.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.post-content li { margin-bottom: 6px; }

.post-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 40px 48px;
}

/* ── KG CARD STYLES (Ghost editor cards) ── */
.kg-image-card img        { width: 100%; }
.kg-gallery-container     { display: flex; flex-wrap: wrap; gap: 4px; }
.kg-gallery-row           { display: flex; gap: 4px; }
.kg-gallery-image img     { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card         { border: 1px solid var(--gray-border); padding: 16px; }
.kg-embed-card            { margin: 24px 0; }
.kg-video-card video      { width: 100%; }
.kg-callout-card {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: var(--gray-light);
  border-left: 4px solid var(--blue);
  margin: 24px 0;
}
.kg-toggle-card           { border: 1px solid var(--gray-border); padding: 16px; margin: 16px 0; }
.kg-button-card           { text-align: center; margin: 24px 0; }
.kg-button-card a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
}

/* ── TAG PAGE HEADER ── */
.tag-header {
  background: linear-gradient(135deg, #0d47a1, #1976d2);
  padding: 48px 40px;
}
.tag-header-blue   { background: linear-gradient(135deg, #0d47a1, #1976d2); }
.tag-header-teal   { background: linear-gradient(135deg, #006064, #00a896); }
.tag-header-green  { background: linear-gradient(135deg, #1b5e20, #2e9e57); }
.tag-header-orange { background: linear-gradient(135deg, #e65100, #f5a623); }

.tag-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.tag-header-emoji {
  font-size: 56px;
  line-height: 1;
}
.tag-header-icon img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}
.tag-header-title {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}
.tag-header-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
  max-width: 560px;
}
.tag-header-count {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-weight: 700;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ── POST HEADER COLORS ── */
.post-header {
  background: var(--gray-light);
  border-bottom: 3px solid var(--blue);
}
.post-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 40px 40px;
}
.post-header-blue   { border-bottom-color: var(--blue); }
.post-header-teal   { border-bottom-color: var(--teal); }
.post-header-green  { border-bottom-color: var(--green); }
.post-header-orange { border-bottom-color: var(--orange); }

/* ── POST FOOTER ── */
.post-footer { border-top: 1px solid var(--gray-border); }
.post-footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.post-tags-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── RELATED POSTS ── */
.related-posts { border-top: 1px solid var(--gray-border); }

/* ── POST TAG LABEL COLORS ── */
.post-tag-label {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  color: #fff;
  background: var(--blue);
}
.post-tag-label.tag-blue   { background: var(--blue); }
.post-tag-label.tag-teal   { background: var(--teal); }
.post-tag-label.tag-green  { background: var(--green); }
.post-tag-label.tag-orange { background: var(--orange); }

/* ── POST HEADER ── */
.post-header {
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  padding: 0;
}
.post-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 40px 36px;
}
.post-title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 20px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 0;
  object-fit: cover;
}

/* ── FEATURE IMAGE ── */
.post-feature-image {
  margin: 0;
  max-height: 500px;
  overflow: hidden;
}
.post-feature-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}
.post-feature-image figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 20px;
  background: var(--gray-light);
}

/* ── POST CONTENT ── */
.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 40px;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
}
.post-content > * + * { margin-top: 20px; }
.post-content h2 { font-size: 26px; font-weight: 900; margin-top: 40px; margin-bottom: 12px; }
.post-content h3 { font-size: 21px; font-weight: 700; margin-top: 32px; margin-bottom: 10px; }
.post-content h4 { font-size: 18px; font-weight: 700; margin-top: 28px; margin-bottom: 8px; }
.post-content p  { margin-bottom: 20px; }
.post-content a  { color: var(--blue); text-decoration: underline; }
.post-content a:hover { color: var(--blue-dark); }
.post-content strong { font-weight: 700; }
.post-content em { font-style: italic; }
.post-content img {
  width: 100%;
  margin: 28px 0;
  display: block;
}
.post-content figure { margin: 28px 0; }
.post-content figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}
.post-content blockquote {
  border-left: 4px solid var(--blue);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--gray-light);
  font-style: italic;
  color: #4a5568;
}
.post-content blockquote p { margin-bottom: 0; }
.post-content pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 24px;
  overflow-x: auto;
  font-size: 14px;
  margin: 28px 0;
  line-height: 1.6;
}
.post-content code {
  background: var(--gray-light);
  padding: 2px 6px;
  font-size: 14px;
  font-family: monospace;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.post-content ul,
.post-content ol {
  padding-left: 28px;
  margin-bottom: 20px;
}
.post-content li { margin-bottom: 8px; }
.post-content hr {
  border: none;
  border-top: 2px solid var(--gray-border);
  margin: 40px 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
}
.post-content th {
  background: var(--gray-light);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--gray-border);
}
.post-content td {
  padding: 10px 16px;
  border: 1px solid var(--gray-border);
}
.post-content tr:nth-child(even) td { background: var(--gray-light); }

/* ── POST FOOTER ── */
.post-footer {
  border-top: 1px solid var(--gray-border);
  padding: 0;
}
.post-footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.post-tags-list { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── RELATED POSTS ── */
.related-posts { border-top: 1px solid var(--gray-border); }

@media (max-width: 768px) {
  .post-header-inner { padding: 32px 20px 24px; }
  .post-title { font-size: 26px; }
  .post-content { padding: 32px 20px; font-size: 16px; }
  .post-footer-inner { padding: 20px; }
}

/* ── SECTION HEADER WITH MORE LINK ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title { margin-bottom: 0; }
.section-title-blue   { color: var(--blue); }
.section-title-green  { color: var(--green); }
.section-title-teal   { color: var(--teal); }
.section-title-orange { color: var(--orange); }

.section-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.2s;
  white-space: nowrap;
}
.section-more:hover { color: var(--blue); }
