/*
Theme Name: Guide CTR
Theme URI: https://guide.lamarlangsung.com
Author: Hermes
Description: Fast, content-first theme optimized for AdSense — clean typography, in-content ad slots, sticky mobile ad, related-posts cards and strong CTAs. Mobile-first.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guide-ctr
*/

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #1a6fd4;
  --accent-2: #0b57b8;
  --border: #e5e7eb;
  --card: #f6f7f9;
  --ad-bg: #f3f4f6;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 8px; top: 8px; z-index: 999; background: #fff; padding: 6px 10px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 58px; gap: 16px;
}
.site-branding { line-height: 1.2; }
.site-title { font-size: 1.25rem; font-weight: 800; color: var(--fg); }
.site-title:hover { text-decoration: none; }
.site-tagline { margin: 0; font-size: 0.78rem; color: var(--muted); }
.site-nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.site-nav a { font-size: 0.92rem; font-weight: 600; color: var(--fg); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Single header */
.single__header { margin: 28px 0 8px; }
.single__header .cat-links a {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--accent); color: #fff;
  padding: 3px 10px; border-radius: 999px; margin: 0 6px 6px 0;
}
.single__header .cat-links a:hover { background: var(--accent-2); text-decoration: none; }
.single__title { font-size: 1.9rem; line-height: 1.25; margin: 12px 0 8px; font-weight: 800; }
.single__meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }

/* Content */
.entry-content h2 {
  font-size: 1.4rem; line-height: 1.3; margin: 1.6em 0 0.6em;
  padding-bottom: 6px; border-bottom: 2px solid var(--border);
}
.entry-content h3 { font-size: 1.15rem; margin: 1.3em 0 0.5em; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }

/* Tables */
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.3em 0; font-size: 0.92em; }
.entry-content th, .entry-content td { border: 1px solid #d8dce2; padding: 9px 12px; text-align: left; vertical-align: top; }
.entry-content th { background: #f2f4f7; font-weight: 600; }
.entry-content tr:nth-child(even) td { background: #fafbfc; }
.quick-answer { background: #f0f7ff; border-left: 4px solid var(--accent); padding: 12px 16px; margin: 1em 0; }
.note { font-size: 0.85em; color: #555; }

/* Ad slots */
.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin: 18px 0;
  position: relative;
}
.ad-slot__label {
  position: absolute; top: 6px; left: 8px;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #9aa5b1;
}
.ad-slot--top { margin-top: 8px; }
.ad-slot--in_content { min-height: 250px; }
.ad-slot--bottom { min-height: 90px; }

/* Sticky ad (mobile) */
.sticky-ad {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: #fff; border-top: 1px solid var(--border);
  padding: 6px 10px; display: none;
}
.sticky-ad .ad-slot { margin: 0; min-height: 60px; }

/* Related posts */
.related { margin: 28px 0; }
.related__title { font-size: 1.25rem; margin-bottom: 14px; }
.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related__card {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: #fff; transition: box-shadow .15s ease, transform .15s ease;
  display: flex; flex-direction: column;
}
.related__card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); text-decoration: none; }
.related__thumb { display: block; width: 100%; aspect-ratio: 16/9; background: var(--card); overflow: hidden; }
.related__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.related__title-sm { padding: 10px 12px; font-weight: 700; font-size: 0.9rem; line-height: 1.3; color: var(--fg); }

/* Post nav */
.post-nav { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0 40px; font-weight: 600; font-size: 0.92rem; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 0.95rem;
}
.btn:hover { background: var(--accent-2); text-decoration: none; }

/* Home / archive grid */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0; }
.post-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.post-card__thumb { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--card); }
.post-card__body { padding: 14px 16px; }
.post-card__title { font-size: 1.1rem; margin: 0 0 8px; line-height: 1.3; }
.post-card__title a { color: var(--fg); }
.post-card__title a:hover { color: var(--accent); text-decoration: none; }
.post-card__excerpt { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 18px 0 70px; font-size: 0.85rem; color: var(--muted); text-align: center; }

.pagination { margin: 20px 0; }

/* Download buttons (app CTA) */
.app-dl {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.app-dl__label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; }
.app-dl__appicon { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.app-dl__labelbody { display: flex; flex-direction: column; line-height: 1.3; }
.app-dl__name { font-weight: 700; font-size: 0.95rem; color: var(--fg); }
.app-dl__meta { font-size: 0.78rem; color: #666; font-weight: 400; }
.app-dl__stars { color: #f5b301; }
.app-dl__buttons { display: flex; flex-direction: column; gap: 8px; }
.app-dl__btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff;
  border-radius: 8px; padding: 8px 16px;
  min-width: 170px;
}
.app-dl__btn:hover { opacity: .88; text-decoration: none; }
.app-dl__icon { width: 27px; height: 27px; flex-shrink: 0; }
.app-dl__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.app-dl__small { font-size: 0.56rem; font-weight: 400; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }
.app-dl__big { font-size: 1.08rem; font-weight: 600; }
@media (max-width: 768px) {
  .app-dl { flex-direction: column; align-items: stretch; }
  .app-dl__buttons { flex-direction: row; flex-wrap: wrap; }
}

/* Responsive */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .single__title { font-size: 1.55rem; }
  .related__grid, .post-grid { grid-template-columns: 1fr 1fr; }
  .entry-content table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .sticky-ad { display: block; }
}
@media (max-width: 480px) {
  .related__grid, .post-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}
