/* ============================================================
   search.css — /cari page styles
   Dark Gold Warm theme, mobile-first
   ============================================================ */

/* SR-only utility (if not already in main.css) */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── LAYOUT ── */
.search-main {
  min-height: calc(100vh - 68px);
  padding: 40px 0 80px;
}
.search-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── HERO (title + form) ── */
.search-hero {
  margin: 32px 0 36px;
}
.search-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #f5f0e8;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

/* ── FORM ── */
.search-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  color: #a08c4a;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  background: #111008;
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: 10px;
  color: #f0e8d0;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.search-input::placeholder { color: #5a5040; }
.search-input:focus {
  border-color: rgba(212,175,55,0.55);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
}
/* hide browser default clear button */
.search-input::-webkit-search-cancel-button { display: none; }

.search-clear {
  position: absolute;
  right: 14px;
  color: #5a5040;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.search-clear:hover { color: #c9a227; }

.search-btn {
  padding: 13px 22px;
  background: linear-gradient(135deg, #c9a227 0%, #a07820 100%);
  color: #0a0806;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
}
.search-btn:hover  { opacity: 0.88; }
.search-btn:active { transform: scale(0.97); }

/* ── RESULT META ── */
.search-meta {
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #7a6e58;
}
.search-count {
  color: #c9a227;
  font-weight: 600;
}
.search-keyword strong { color: #e0d0a0; font-weight: 500; }
.search-count-zero { color: #7a6e58; }
.search-count-zero strong { color: #a09070; font-weight: 500; }

/* ── EMPTY STATE ── */
.search-empty {
  margin-top: 48px;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed rgba(212,175,55,0.15);
  border-radius: 16px;
}
.search-empty-icon {
  color: rgba(212,175,55,0.25);
  margin-bottom: 20px;
}
.search-empty-title {
  font-size: 1.05rem;
  color: #c0b080;
  font-weight: 600;
  margin-bottom: 8px;
}
.search-empty-hint {
  font-size: 0.9rem;
  color: #6a6050;
  margin-bottom: 28px;
  line-height: 1.6;
}
.search-empty-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.search-link-panduan {
  font-size: 0.9rem;
  color: #a08c4a;
  text-decoration: none;
  transition: color 0.15s;
}
.search-link-panduan:hover { color: #c9a227; }

/* ── LANDING STATE (no query) ── */
.search-landing {
  margin-top: 8px;
}
.search-landing-hint {
  font-size: 0.92rem;
  color: #6a6050;
  margin-bottom: 28px;
}
.search-topics-label {
  font-size: 0.85rem;
  color: #5a5040;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.search-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.search-topic-chip {
  padding: 7px 16px;
  background: rgba(212,175,55,0.06);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 100px;
  color: #c0a860;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.search-topic-chip:hover {
  background: rgba(212,175,55,0.13);
  border-color: rgba(212,175,55,0.4);
  color: #e8c84a;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .search-form { flex-direction: column; }
  .search-btn  { width: 100%; padding: 13px; }
  .search-empty { padding: 36px 16px; }
}

/* ── SEARCH RESULTS LIST ── */
.search-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .search-list {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

.search-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  align-self: stretch;
}
.search-item-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.search-item-title-link:hover .search-item-title {
  color: #c9a227;
}
.search-item:hover {
  background: rgba(212,175,55,0.06);
  border-color: rgba(212,175,55,0.28);
}

/* Thumbnail — fixed 110×80 */
.search-item-thumb {
  flex-shrink: 0;
  width: 110px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(212,175,55,0.06);
}
.search-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.search-item-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(212,175,55,0.25);
}

/* Body */
.search-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-item-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search-item-cat {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c9a227;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.search-item-date {
  font-size: 0.75rem;
  color: #5a5040;
}

.search-item-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: #f0e8d0;
  line-height: 1.4;
  margin: 0;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-item-desc {
  font-size: 0.83rem;
  color: #7a6e58;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

/* Arrow */
.search-item-arrow {
  flex-shrink: 0;
  align-self: center;
  color: rgba(212,175,55,0.3);
  font-size: 1rem;
  transition: color 0.15s, transform 0.15s;
}
.search-item:hover .search-item-arrow {
  color: #c9a227;
  transform: translateX(3px);
}

/* Mobile — stack thumb on top */
@media (max-width: 540px) {
  .search-item {
    flex-direction: column;
    gap: 12px;
  }
  .search-item-thumb {
    width: 100%;
    height: 160px;
  }
  .search-item-arrow {
    display: none;
  }
}

/* ── TAG CHIPS (result cards) ── */
.cat-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
}
.cat-card-tag-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 100px;
  border: 1px solid rgba(212,175,55,0.25);
  background: rgba(212,175,55,0.07);
  color: #a08840;
  font-size: 0.76rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  pointer-events: all;
}
.cat-card-tag-chip:hover {
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.45);
  color: #d4af37;
}

/* ── TAG CLOUD (landing state) ── */
.search-topic-chip--tag {
  font-size: 0.82rem;
  padding: 5px 12px;
  position: relative;
}
.search-chip-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 100px;
  background: rgba(212,175,55,0.15);
  color: #c0a860;
  font-size: 0.72rem;
  vertical-align: middle;
}
