/*
Theme Name: Linisehat Blog
Theme URI: https://linisehat.com
Author: Faisal Noer Ariandy
Description: Tema blog WordPress yang clean, sederhana, cepat, dan SEO-friendly ala Diksia untuk Linisehat.
Version: 1.8
Text Domain: linisehat-blog
*/

:root {
  --brand-blue: #2f80ed;
  --brand-hover: #3e8df4;
  --bg-primary: #ffffff;
  --bg-secondary: #f0f2f5;
  --text-primary: #262626;
  --text-secondary: #474747;
  --text-tertiary: #777777;
  --border-color: #dbdee2;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
  --bg-primary: #121212;
  --bg-secondary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #cacaca;
  --text-tertiary: #8b8b8b;
  --border-color: #303030;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--brand-hover); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}
.site-logo {
  font-weight: 800;
  font-size: 22px;
  color: var(--text-primary);
}
.site-logo span { color: var(--brand-blue); }

.site-logo-wrap img {
  max-height: 30px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 600;
  font-size: 14.5px;
}
.nav-menu a { color: var(--text-primary); }
.nav-menu a:hover { color: var(--brand-blue); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.2s, color 0.2s;
}
.action-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--brand-blue);
}
.action-btn .icon {
  width: 20px;
  height: 20px;
}

/* Toggle dark mode: tampilkan ikon bulan di mode terang, matahari di mode gelap */
#themeToggle .icon-sun { display: none; }
#themeToggle .icon-moon { display: block; }
body.dark-mode #themeToggle .icon-sun { display: block; }
body.dark-mode #themeToggle .icon-moon { display: none; }

/* Panel pencarian (dropdown di bawah header) */
.search-panel {
  max-height: 0;
  overflow: hidden;
  background-color: var(--bg-primary);
  border-bottom: 1px solid transparent;
  transition: max-height 0.25s ease, border-color 0.25s ease;
}
.search-panel.is-open {
  max-height: 90px;
  border-bottom: 1px solid var(--border-color);
}
.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
}
.search-form .icon {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.search-field {
  flex-grow: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 16px;
  color: var(--text-primary);
  font-family: inherit;
}
.search-field::placeholder { color: var(--text-tertiary); }
.search-submit {
  background-color: var(--brand-blue);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  flex-shrink: 0;
}
.search-submit:hover { background-color: var(--brand-hover); }

/* Hamburger menu: disembunyikan di desktop, muncul di layar sempit */
#navToggle { display: none; }

@media (max-width: 780px) {
  #navToggle { display: inline-block; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { border-bottom: 1px solid var(--border-color); }
  .nav-menu li:last-child { border-bottom: none; }
  .nav-menu a { display: block; padding: 12px 0; }
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  padding: 40px 0;
}
@media(max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-blue);
  display: inline-block;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media(max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
}

.post-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.post-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.post-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.post-title {
  font-size: 16px;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  line-height: 1.4;
}
.post-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  flex-grow: 1;
}
.post-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.sidebar-widget {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 25px;
}
.sidebar-widget h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text-primary); font-weight: 500; }
.sidebar-list a:hover { color: var(--brand-blue); }

.comments-area .comment-list { list-style: none; }
.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}
.comments-area .comment-form textarea { min-height: 120px; resize: vertical; }
.comments-area .comment-form .form-submit input[type="submit"] {
  background-color: var(--brand-blue);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.comments-area .comment-form .form-submit input[type="submit"]:hover {
  background-color: var(--brand-hover);
}

footer.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 30px;
  padding-top: 20px;
}