@charset "UTF-8";
/* HastaBlog - Modern theme
   PJAX-ready, responsive, light/dark. */

:root {
  --bg: #f4f5f7;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-border: #e6e8eb;
  --text: #1c2024;
  --text-soft: #5b636c;
  --muted: #8b929b;
  --accent: #2f6fed;
  --accent-soft: #e7efff;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 20px rgba(16, 24, 40, .06);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0e1116;
  --bg-soft: #151a21;
  --card: #161b22;
  --card-border: #232a33;
  --text: #e7ebf0;
  --text-soft: #aeb6c0;
  --muted: #717b86;
  --accent: #4d8bff;
  --accent-soft: #18233b;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Progress bar (content-driven) */
.hb-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), #8ab4ff);
  z-index: 1000; opacity: 0; transition: width .2s ease, opacity .3s ease;
  box-shadow: 0 0 8px var(--accent);
}
.hb-progress.is-active { opacity: 1; }

/* Header */
.hb-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--card-border);
  z-index: 900;
}
.hb-header-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
}
.hb-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.hb-brand:hover { text-decoration: none; }
.hb-brand-mark {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #8ab4ff);
  box-shadow: 0 2px 8px rgba(47, 111, 237, .4);
}
.hb-brand-text { white-space: nowrap; }

.hb-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.hb-nav-link {
  color: var(--text-soft); font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: var(--radius-sm); text-transform: capitalize;
}
.hb-nav-link:hover { color: var(--text); background: var(--bg); text-decoration: none; }
.hb-nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

.hb-search { margin-left: auto; position: relative; display: flex; }
.hb-search input {
  width: 200px; max-width: 42vw; padding: 8px 38px 8px 14px;
  border: 1px solid var(--card-border); background: var(--bg); color: var(--text);
  border-radius: 999px; font-size: 14px; outline: none; transition: border-color .15s, width .2s;
}
.hb-search input:focus { border-color: var(--accent); width: 240px; }
.hb-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px;
}
.hb-search button:hover { color: var(--accent); }

.hb-theme-toggle {
  border: 1px solid var(--card-border); background: var(--bg); color: var(--text-soft);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  flex: 0 0 auto;
}
.hb-theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
html[data-theme="dark"] .hb-icon-moon { display: none; }
html:not([data-theme="dark"]) .hb-icon-sun { display: none; }
.hb-icon-sun { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Layout */
.hb-container {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start;
}
.hb-main { min-width: 0; }
.hb-side { position: sticky; top: calc(var(--header-h) + 26px); display: flex; flex-direction: column; gap: 18px; }

/* Cards / posts */
.hb-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.hb-card-title {
  margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700;
}

.hb-post { margin-bottom: 22px; }
.hb-post-title { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 700; }
.hb-post-title a { color: var(--text); }
.hb-post-title a:hover { color: var(--accent); text-decoration: none; }

.hb-meta {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  color: var(--muted); font-size: 13px; margin-bottom: 14px;
}
.hb-meta .hb-chip {
  display: inline-flex; align-items: center; gap: 5px;
}
.hb-meta a { color: var(--text-soft); font-weight: 600; }
.hb-cat-tag {
  background: var(--accent-soft); color: var(--accent); padding: 3px 10px;
  border-radius: 999px; font-weight: 600; font-size: 12px;
}
.hb-cat-tag:hover { text-decoration: none; filter: brightness(1.05); }

.hb-content { color: var(--text-soft); font-size: 15px; line-height: 1.75; word-wrap: break-word; }
.hb-content img { border-radius: var(--radius-sm); }
.hb-content p { margin: 0 0 1em; }

.hb-readmore {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  color: var(--accent); font-weight: 600;
}
.hb-readmore::after { content: "→"; transition: transform .15s; }
.hb-readmore:hover { text-decoration: none; }
.hb-readmore:hover::after { transform: translateX(3px); }

.hb-divider { border: 0; border-top: 1px solid var(--card-border); margin: 22px 0; }

/* Page header (category / search / static) */
.hb-page-head { margin-bottom: 20px; }
.hb-page-head h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; }
.hb-page-head p { margin: 0; color: var(--muted); }

/* Single post */
.hb-article .hb-lead { font-size: 17px; color: var(--text); font-style: italic; margin-bottom: 16px; }

/* Pagination / nav */
.hb-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.hb-pager-pages { display: flex; gap: 6px; flex-wrap: wrap; }
.hb-btn, .hb-page-num {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--card-border); background: var(--card); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.hb-btn:hover, .hb-page-num:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.hb-page-num.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.hb-btn[disabled], .hb-btn.is-disabled { opacity: .4; pointer-events: none; }

.hb-pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; margin-top: 24px;
}
.hb-pagination .hb-page-num {
  min-width: 38px; height: 38px; padding: 0 10px; justify-content: center;
}
.hb-pagination .hb-page-num.is-disabled { opacity: .35; pointer-events: none; }
.hb-page-edge { font-size: 16px; line-height: 1; }
.hb-page-gap { color: var(--muted); padding: 0 4px; user-select: none; }

.hb-stats { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.9; }

/* Sidebar lists */
.hb-list { list-style: none; margin: 0; padding: 0; }
.hb-list li { margin: 0; }
.hb-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 8px; border-radius: var(--radius-sm); color: var(--text-soft); font-weight: 500; font-size: 14px;
}
.hb-list a:hover { background: var(--bg); color: var(--accent); text-decoration: none; }
.hb-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-badge { background: var(--bg); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-style: normal; flex: 0 0 auto; }
.hb-list-num { counter-reset: top; }
.hb-list-num li { counter-increment: top; }
.hb-list-num a span::before { content: counter(top) ". "; color: var(--accent); font-weight: 700; }

.hb-admin-link {
  display: block; text-align: center; padding: 10px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
}
.hb-admin-link:hover { text-decoration: none; filter: brightness(1.05); }

.hb-muted { color: var(--muted); font-size: 13px; }

/* Comments */
.hb-comments { margin-top: 26px; }
.hb-comment {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
.hb-comment-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.hb-comment-author { font-weight: 700; color: var(--text); }
.hb-comment-body { color: var(--text-soft); }

.hb-comment-toggle { margin: 18px 0; }
.hb-comment-frame {
  width: 100%; min-height: 240px; border: 1px solid var(--card-border);
  border-radius: var(--radius); background: var(--card); margin-top: 12px;
  display: block; overflow: hidden;
}

/* Forms */
.hb-form { display: grid; gap: 14px; max-width: 520px; }
.hb-form label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; }
.hb-form input[type="text"], .hb-form input[type="email"], .hb-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--card-border);
  background: var(--bg); color: var(--text); border-radius: var(--radius-sm); font: inherit;
}
.hb-form input:focus, .hb-form textarea:focus { outline: none; border-color: var(--accent); }
.hb-form textarea { resize: vertical; min-height: 120px; }
.hb-submit {
  background: var(--accent); color: var(--accent-contrast); border: 0; padding: 11px 22px;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; cursor: pointer; justify-self: start;
}
.hb-submit:hover { filter: brightness(1.06); }

.hb-notice {
  padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--card-border);
  background: var(--accent-soft); color: var(--text);
}

/* Gallery */
.hb-gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.hb-gallery-grid a { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--bg); border: 1px solid var(--card-border); }
.hb-gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.hb-gallery-grid a:hover img { transform: scale(1.06); }

.hb-image-view { text-align: center; }
.hb-image-view img { border-radius: var(--radius); box-shadow: var(--shadow); }
.hb-image-info { margin-top: 14px; color: var(--text-soft); font-size: 14px; }

.hb-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-thumbs a { width: 54px; height: 54px; border-radius: 8px; overflow: hidden; border: 1px solid var(--card-border); }
.hb-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.hb-footer { border-top: 1px solid var(--card-border); background: var(--bg-soft); margin-top: 30px; }
.hb-footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 20px;
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start;
}
.hb-footer-meta { text-align: right; color: var(--muted); font-size: 13px; }
.hb-footer-meta p { margin: 0 0 4px; }
.hb-powered a { color: var(--text-soft); }

/* Fade for swapped content */
.hb-main, .hb-side { transition: opacity .18s ease; }
body.hb-loading .hb-main, body.hb-loading .hb-side { opacity: .45; }

/* Responsive */
@media (max-width: 900px) {
  .hb-container { grid-template-columns: 1fr; }
  .hb-side { position: static; }
}
@media (max-width: 680px) {
  .hb-brand-text { display: none; }
  .hb-nav { gap: 0; margin-left: 0; }
  .hb-nav-link { padding: 8px 9px; font-size: 13px; }
  .hb-search input { width: 130px; }
  .hb-search input:focus { width: 150px; }
  .hb-footer-inner { flex-direction: column; }
  .hb-footer-meta { text-align: left; }
}
