/*! CheapHost Blog — fast, dependency-free CSS (no framework). */

:root {
  --b-blue: #1f9ee0;
  --b-navy: #1b3768;
  --b-navy-dark: #101f39;
  --b-orange: #f7941d;
  --b-green: #7ac143;
  --b-ink-900: #101f39;
  --b-ink-700: #33465f;
  --b-ink-500: #64748b;
  --b-ink-100: #eaf1f8;
  --b-surface: #ffffff;
  --b-surface-alt: #f5f9fc;
  --b-border: #e1e9f2;
  --b-radius: 14px;
  --b-shadow: 0 10px 30px rgba(16, 31, 57, 0.08);
  --b-font-heading: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --b-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --b-max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--b-font-body);
  color: var(--b-ink-700);
  background: var(--b-surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--b-font-heading); color: var(--b-ink-900); line-height: 1.25; }
a { color: var(--b-blue); text-decoration: none; }
a:hover { color: var(--b-navy); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--b-max-width); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  background: var(--b-surface);
  border-bottom: 1px solid var(--b-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem; }
.site-logo { display: flex; align-items: center; gap: .6rem; font-family: var(--b-font-heading); font-weight: 700; font-size: 1.1rem; color: var(--b-navy); }
.site-logo img { height: 34px; width: auto; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: var(--b-ink-700); font-weight: 600; font-size: .92rem; }
.site-nav a:hover { color: var(--b-blue); text-decoration: none; }
.site-nav .btn-main-site {
  background: var(--b-navy);
  color: #fff;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem;
}
.site-nav .btn-main-site:hover { background: var(--b-blue); color: #fff; text-decoration: none; }

.search-form { display: flex; }
.search-form input { border: 1px solid var(--b-border); border-radius: 999px 0 0 999px; padding: .45rem .9rem; font-size: .88rem; width: 180px; }
.search-form button { border: none; background: var(--b-blue); color: #fff; border-radius: 0 999px 999px 0; padding: 0 1rem; cursor: pointer; }

/* Hero / page header */
.blog-hero { background: var(--b-navy-dark); color: #fff; padding: 3.5rem 0; text-align: center; }
.blog-hero h1 { color: #fff; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); margin: 0 0 .6rem; }
.blog-hero p { color: rgba(255,255,255,.75); max-width: 560px; margin: 0 auto; }

/* Layout: main + sidebar */
.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; padding: 2.5rem 0 4rem; align-items: start; }
@media (max-width: 900px) { .blog-layout { grid-template-columns: 1fr; } }

/* Post cards (listing) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.75rem; }
.post-card {
  background: var(--b-surface);
  border: 1px solid var(--b-border);
  border-radius: var(--b-radius);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--b-shadow); }
.post-card .thumb { display: block; aspect-ratio: 16/9; background: var(--b-ink-100); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.25rem; }
.post-card .category-tag { color: var(--b-blue); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.post-card h2, .post-card h3 { font-size: 1.1rem; margin: .5rem 0; }
.post-card h2 a, .post-card h3 a { color: var(--b-ink-900); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--b-blue); text-decoration: none; }
.post-card p.excerpt { color: var(--b-ink-500); font-size: .9rem; margin: 0 0 .8rem; }
.post-meta { color: var(--b-ink-500); font-size: .78rem; display: flex; gap: .8rem; flex-wrap: wrap; }

/* Sidebar */
.sidebar-widget { background: var(--b-surface-alt); border: 1px solid var(--b-border); border-radius: var(--b-radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.sidebar-widget h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--b-navy); margin-top: 0; }
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget li { margin-bottom: .6rem; font-size: .9rem; }
.sidebar-widget li a { color: var(--b-ink-700); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-cloud a { background: var(--b-ink-100); color: var(--b-ink-700); padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; }
.tag-cloud a:hover { background: var(--b-blue); color: #fff; text-decoration: none; }

/* Pagination */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
  padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--b-border); font-size: .88rem; color: var(--b-ink-700);
}
.pagination .current { background: var(--b-navy); color: #fff; border-color: var(--b-navy); }
.pagination a:hover { border-color: var(--b-blue); color: var(--b-blue); text-decoration: none; }

/* Single post */
.post-article { max-width: 760px; }
.post-article .post-title { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); margin-bottom: .6rem; }
.post-article .post-meta { margin-bottom: 1.5rem; }
.post-article .featured-image { border-radius: var(--b-radius); overflow: hidden; margin-bottom: 2rem; }
.post-content { font-size: 1.05rem; color: var(--b-ink-700); }
.post-content h2 { margin-top: 2.2rem; font-size: 1.4rem; }
.post-content h3 { margin-top: 1.8rem; font-size: 1.2rem; }
.post-content p { margin: 1.1rem 0; }
.post-content img { border-radius: 10px; margin: 1.5rem 0; }
.post-content pre { background: var(--b-navy-dark); color: #dbe9f7; padding: 1rem 1.25rem; border-radius: 10px; overflow-x: auto; font-size: .88rem; }
.post-content code { background: var(--b-ink-100); padding: .1rem .4rem; border-radius: 4px; font-size: .9em; }
.post-content pre code { background: none; padding: 0; }
.post-content blockquote { border-left: 4px solid var(--b-blue); margin: 1.5rem 0; padding: .3rem 1.2rem; color: var(--b-ink-500); font-style: italic; }
.post-content ul, .post-content ol { padding-left: 1.4rem; }
.post-content a { text-decoration: underline; }

.post-tags-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0; }
.post-tags-list a { background: var(--b-ink-100); padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; color: var(--b-ink-700); }
.post-tags-list a:hover { background: var(--b-blue); color: #fff; text-decoration: none; }

.breadcrumbs { font-size: .82rem; color: var(--b-ink-500); margin-bottom: 1.25rem; }
.breadcrumbs a { color: var(--b-ink-500); }

.related-posts { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--b-border); }

/* Footer */
.site-footer { background: var(--b-navy-dark); color: rgba(255,255,255,.7); padding: 3rem 0; margin-top: 2rem; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; align-items: center; }
.site-footer .copyright { font-size: .82rem; color: rgba(255,255,255,.5); margin-top: 1.5rem; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--b-ink-500); }
