/*
Theme Name: GHZ Header Theme
Theme URI: https://example.com/
Author: You
Description: Minimal theme with GameHitZone-like header
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: ghz-header
*/

:root {
  --ghz-bg: #3a3d3f;
  --ghz-pill: #05bf83;
  --ghz-pill-dark: #02a66f;
  --ghz-text: #ffffff;
  --ghz-muted: #cfd3d6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #111; }

/* Header */
.site-header { background: var(--ghz-bg); color: var(--ghz-text); }
.header-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 12px 16px; }

/* Logo */
.site-logo { display: flex; align-items: center; gap: 8px; color: var(--ghz-text); text-decoration: none; font-weight: 700; font-size: 26px; }
.site-logo .hit { color: #ff5a3c; }

/* Primary nav */
.primary-nav { display: flex; gap: 18px; align-items: center; }
.primary-nav a { color: var(--ghz-muted); text-decoration: none; font-weight: 600; }
.primary-nav a:hover { color: var(--ghz-text); }

/* Search */
.header-search { display: flex; align-items: center; gap: 8px; }
.header-search input[type="search"] { width: 360px; max-width: 60vw; border: 0; outline: none; padding: 12px 14px; border-radius: 6px; }
.header-search button { background: var(--ghz-pill); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 6px; cursor: pointer; }
.header-search button:hover { background: var(--ghz-pill-dark); }

/* Category pills bar */
.pills-bar { background: var(--ghz-bg); padding: 8px 16px 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.pills-desktop { display: block; }
.pills-scroll { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: thin; padding: 0 0 4px; }
.pill { background: var(--ghz-pill); color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 6px; display: inline-flex; gap: 8px; white-space: nowrap; font-weight: 700; font-size: 15px; }
.pill:hover { background: var(--ghz-pill-dark); }
.pill .home-icon { width: 18px; height: 18px; display: inline-block; background: #fff; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"> <path fill=\"%23000\" d=\"M12 3l9 8h-3v8h-5v-5H11v5H6v-8H3l9-8z\"/></svg>') no-repeat center / contain; mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"> <path fill=\"%23000\" d=\"M12 3l9 8h-3v8h-5v-5H11v5H6v-8H3l9-8z\"/></svg>') no-repeat center / contain; }

/* Mobile categories toggle */
.categories-toggle { display: none; width: 100%; background: var(--ghz-pill); color: #fff; border: 0; padding: 10px 12px; font-weight: 700; }
.categories-toggle .icon { margin-right: 8px; display: inline-block; vertical-align: middle; }

/* Mobile */
.mobile-toggle { display: none; background: transparent; border: 0; color: #fff; cursor: pointer; width: 40px; height: 40px; border-radius: 6px; }
.mobile-toggle svg { display: block; }
.mobile-search { display: none; padding: 8px 16px 0; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.categories-mini { display: none; background: var(--ghz-pill); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 8px; }
.mobile-search + .categories-toggle { margin: 10px 16px 0; width: calc(100% - 32px); border-radius: 8px; padding: 10px 12px; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr; gap: 10px; }
  .primary-nav { display: none; }
  .mobile-toggle, .header-actions { display: none; }
  .mobile-search { display: grid; }
  .categories-mini { display: inline-flex; align-items: center; justify-content: center; }
  .header-search { flex: 1; width: 100%; }
  .header-search input[type=search] { width: 100%; max-width: none; display: block; }
  .categories-toggle { display: none; }
  .pills-desktop { display: none; }
  /* ensure search first, button right */
  .mobile-search .header-search { order: 1; }
  .mobile-search .categories-mini { order: 2; }
}

/* Mobile menu panel */
.mobile-panel { display: none; background: var(--ghz-bg); border-top: 1px solid rgba(255,255,255,0.08); }
.mobile-panel.open { display: block; }
.mobile-menu { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }
.mobile-menu a { color: var(--ghz-text); text-decoration: none; font-weight: 600; }
.mobile-menu a:hover { color: #fff; }

/* Basic content */
.site-content { max-width: 1200px; margin: 24px auto; padding: 0 16px; }

/* Homepage hero */
.home .hero-wrap { background: linear-gradient(180deg, #05bf83 0%, #05bf83 30%, #b1c8ff 100%); color: #fff; padding: 26px 16px 28px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; margin-bottom: 18px; }
.home .hero-inner { max-width: 1200px; margin: 0 auto; }
.home .hero-title { text-align: center; font-weight: 800; letter-spacing: 0.3px; margin: 0 0 12px; }
.home .hero-search { display: flex; align-items: center; gap: 8px; }
.home .hero-search input[type=search] { flex: 1; padding: 14px 16px; border-radius: 8px; border: 0; font-size: 16px; }
.home .hero-search button { width: 44px; height: 44px; border-radius: 8px; border: 0; background: #08d290; color: #fff; }
.home .hero-search button:hover { background: #06be82; }

/* Post grid */
.post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.post-card { background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; overflow: hidden; }
.post-card a { color: inherit; text-decoration: none; }
.post-card .thumb { display: block; width: 100%; height: 180px; background: #f1f1f1; object-fit: cover; }
.post-card .meta { padding: 10px 12px; font-weight: 700; }

@media (max-width: 1000px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card .thumb { height: 140px; }
  .post-card .meta { padding: 12px; font-size: 15px; }
  .header-search input[type=search] { padding: 14px 16px; border-radius: 8px; font-size: 16px; }
}
@media (max-width: 480px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer { background: #f4f6f8; border-top: 1px solid #e6e6e6; margin-top: 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 16px; }
.footer-pages { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-link { background: #fff; border: 1px solid #dfe3e6; color: #2b2f33; padding: 8px 12px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.footer-link:hover { background: #eef3f7; }

/* Single post layout */
.single-layout { max-width: 1200px; margin: 24px auto; padding: 0 16px; display: grid; grid-template-columns: 240px 1fr 280px; gap: 20px; }
.single-sidebar .sticky { position: sticky; top: 84px; }
.toc h3, .latest h3 { margin: 0 0 10px; }
.toc nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.toc nav a { text-decoration: none; color: #2b2f33; }
.toc nav a:hover { text-decoration: underline; }

.card { background: #fff; border: 1px solid #e6e6e6; border-radius: 10px; padding: 12px; }
.single-hero { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; margin-bottom: 16px; }
.single-hero .hero-media img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.download-btn { background: #05bf83; color: #fff; border: 0; padding: 12px 14px; border-radius: 8px; font-weight: 800; cursor: pointer; }
.download-btn .count { margin-left: 8px; }
.download-note { margin-top: 8px; color: #04a471; font-weight: 700; }

.shots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.shots-grid .shot img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; }

.latest-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.latest-item { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.latest-item .thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }

@media (max-width: 1100px) {
  .single-layout { grid-template-columns: 200px 1fr 240px; }
  .shots-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .single-layout { grid-template-columns: 1fr; }
  .single-hero { grid-template-columns: 1fr; }
  .shots-grid { grid-template-columns: repeat(2, 1fr); }
  .single-sidebar .sticky { position: static; }
}

/* Page layout */
.page-layout { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.page-card .page-header { margin-bottom: 12px; }
.page-card .page-title { margin: 0 0 8px; }
.page-card .page-thumb img { width: 100%; height: auto; border-radius: 8px; }
/* Show desktop categories bar on larger screens */
@media (min-width: 901px) {
  .categories-toggle, #categories-panel.pills-mobile { display: none !important; }
  .pills-desktop { display: block; }
  .mobile-search { display: none !important; }
}



