/* Home page (application/views/pages/home.php): search band, topic tiles, latest guides.
   Brand colours from the logo: leaf green and sand. */
:root { --g: #2e6b34; --g-dark: #1f4d26; --g-light: #4c8a3c; --sand: #c8a57c; --sand-dark: #8a6a3f; }
body.light { background: #f6f7f9; }

/* Green band with the big search box */
.hm-band { background: linear-gradient(135deg, var(--g-dark) 0%, var(--g) 55%, var(--g-light) 100%); color: #fff; padding: 52px 0 74px; text-align: center; }
.hm-band h1 { font-size: 36px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.01em; }
.hm-band p { margin: 0 0 26px; color: #e3eedb; font-size: 16.5px; }

.hm-search { max-width: 640px; margin: 0 auto; display: flex; align-items: center; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.hm-search svg { width: 20px; height: 20px; color: #9ca3af; margin: 0 4px 0 10px; flex: none; }
.hm-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 12px 8px; font-size: 16px; color: #1f2328; background: transparent; }
.hm-search button { border: 0; background: var(--sand); color: #2b2416; border-radius: 8px; padding: 12px 22px; font-size: 15px; font-weight: 700; }
.hm-search button:hover { background: #b8935f; }
.hm-search:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.55), 0 10px 30px rgba(0,0,0,.2); }

.hm-popular { margin-top: 16px; font-size: 13.5px; color: #e3eedb; }
.hm-popular a { display: inline-block; margin: 6px 3px 0; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }
.hm-popular a:hover { background: rgba(255,255,255,.3); }

/* Topic tiles, pulled up over the band */
.hm-main { padding-bottom: 20px; }
.hm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -36px; position: relative; }
.hm-tile { display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border: 1px solid #e6e8eb; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.05); color: #1f2328; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.hm-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.09); color: #1f2328; }
.hm-tile i { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.hm-tile i svg { width: 22px; height: 22px; }
.hm-tile b { display: block; font-size: 16px; }
.hm-tile small { color: #6b7280; font-size: 12.5px; }

/* Latest guides */
.hm-title { font-size: 21px; font-weight: 700; margin: 36px 0 14px; }
.hm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hm-card { position: relative; display: flex; flex-direction: column; padding: 18px 18px 16px; background: #fff; border: 1px solid #e6e8eb; border-top: 4px solid var(--c, var(--sand)); border-radius: 12px; transition: box-shadow .15s, transform .15s; }
.hm-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.08); transform: translateY(-2px); }
.hm-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c, var(--sand-dark)); }
.hm-card h3 { font-size: 16.5px; font-weight: 700; line-height: 1.38; margin: 8px 0; }
.hm-card h3 a { color: #1f2328; text-decoration: none; }
.hm-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.hm-card h3 a:focus-visible { outline: none; }
.hm-card:focus-within { outline: 3px solid rgba(46,107,52,.35); outline-offset: 2px; }
.hm-card p { flex: 1; margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: #4b5563; }
.hm-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #6b7280; }
.hm-read { font-size: 13px; font-weight: 700; color: var(--g); }

@media (max-width: 991px) {
  .hm-tiles { grid-template-columns: repeat(2, 1fr); }
  .hm-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .hm-band { padding: 34px 0 60px; }
  .hm-band h1 { font-size: 25px; }
  .hm-band p { font-size: 14.5px; margin-bottom: 20px; }
  .hm-search button { padding: 12px 16px; }
  .hm-popular a:nth-of-type(n+4) { display: none; }
  .hm-tiles { gap: 12px; }
  .hm-tile { padding: 13px; gap: 10px; }
  .hm-tile i { width: 38px; height: 38px; }
  .hm-tile b { font-size: 15px; }
  .hm-grid { grid-template-columns: 1fr; }
}
