/* ================================================================
   HuntMeReviews homepage
   Layout sizing matches the agreed reference exactly; colour and
   type are HuntMeReviews. Everything is scoped to .hmr-home so the
   parent coupon theme is untouched elsewhere.
   ================================================================ */

.hmr-home {
  --ink: #212529;
  --ink-soft: #495057;
  --muted: #6c757d;
  --line: #e9ecef;
  --line-strong: #ced4da;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --brand: #6a1b9a;
  --brand-dark: #4e1273;
  --brand-tint: #f4e9fb;
  --accent: #ffc720;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, .10);
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

.hmr-home *,
.hmr-home *::before,
.hmr-home *::after { box-sizing: border-box; }

.hmr-home img { max-width: 100%; display: block; height: auto; }

.hmr-home a { color: var(--brand); text-decoration: none; }
.hmr-home a:hover { color: var(--brand-dark); text-decoration: underline; }

.hmr-home h1,
.hmr-home h2,
.hmr-home h3,
.hmr-home h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .6rem;
  font-weight: 700;
}

.hmr-home h1 { font-size: 2.1rem; }
.hmr-home h2 { font-size: 1.6rem; }
.hmr-home h3 { font-size: 1.25rem; }
.hmr-home h4 { font-size: 1.05rem; }

.hmr-home p { margin: 0 0 1rem; }

.hmr-home .container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  float: none;
}

/* Parent theme list resets - its bullets and indents must not reach these. */
.hmr-home ul,
.hmr-home ol { margin: 0; padding: 0; }
.hmr-home li { list-style: none; }

/* ---------- Shared bits ---------- */

.hmr-home .tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 4px 9px;
  border-radius: 3px;
}
.hmr-home .tag:hover { text-decoration: none; background: var(--brand); color: #fff; }

.hmr-home .readmore {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand);
}

.hmr-home .meta {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hmr-home .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin: 0 0 22px;
}
.hmr-home .section-head h1,
.hmr-home .section-head h2 { margin: 0; font-size: 1.32rem; }
.hmr-home .section-head a {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
}

/* ---------- Featured grid ---------- */

.hmr-home .featured { padding: 34px 0 6px; }

.hmr-home .grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.hmr-home .card { display: flex; flex-direction: column; }

.hmr-home .card-thumb {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  aspect-ratio: 16 / 10;
}
.hmr-home .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.hmr-home .card:hover .card-thumb img { transform: scale(1.04); }

.hmr-home .card-body { padding: 12px 0 0; }
.hmr-home .card-title { font-size: 1.08rem; margin: 8px 0 6px; }
.hmr-home .card-title a { color: var(--ink); }
.hmr-home .card-title a:hover { color: var(--brand); text-decoration: none; }
.hmr-home .card-excerpt { font-size: .9rem; color: var(--ink-soft); margin: 0 0 10px; }

/* ---------- Popular row ---------- */

.hmr-home .popular { padding: 40px 0; }

.hmr-home .popular-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hmr-home .popular-item .card-thumb { aspect-ratio: 4 / 3; }
.hmr-home .popular-rank {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--line-strong);
  line-height: 1;
  display: block;
  margin-top: 10px;
}
.hmr-home .popular-item h3 { font-size: .98rem; margin: 6px 0 4px; }
.hmr-home .popular-item h3 a { color: var(--ink); }
.hmr-home .popular-item h3 a:hover { color: var(--brand); text-decoration: none; }

/* ---------- Main layout with sidebar ---------- */

.hmr-home .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 46px;
  padding: 10px 0 50px;
  align-items: start;
}

/* ---------- Feed (horizontal article cards) ---------- */

.hmr-home .feed { display: flex; flex-direction: column; gap: 30px; }

.hmr-home .feed-item {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.hmr-home .feed-item:last-child { border-bottom: 0; padding-bottom: 0; }
.hmr-home .feed-item .card-thumb { aspect-ratio: 4 / 3; }
.hmr-home .feed-item h3 { font-size: 1.3rem; margin: 8px 0 8px; }
.hmr-home .feed-item h3 a { color: var(--ink); }
.hmr-home .feed-item h3 a:hover { color: var(--brand); text-decoration: none; }
.hmr-home .feed-item p { font-size: .92rem; color: var(--ink-soft); }

.hmr-home .feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ---------- Sidebar ---------- */

/* The parent coupon theme styles bare .sidebar, .widget and .container for its
   own layout - notably ".sidebar { float: right; width: 25% }", which crushed
   this column. Reset every property we depend on rather than inherit theirs. */
.hmr-home .sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  max-width: 100%;
  float: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.hmr-home .main-col {
  width: 100%;
  max-width: 100%;
  float: none;
  padding: 0;
  margin: 0;
}

.hmr-home .widget {
  display: block;
  width: 100%;
  float: none;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  background: var(--bg);
  box-shadow: none;
}
.hmr-home .widget-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.hmr-home .cat-list,
.hmr-home .recent-list { list-style: none; margin: 0; padding: 0; }

.hmr-home .cat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.hmr-home .cat-list li:last-child { border-bottom: 0; }
.hmr-home .cat-list a { color: var(--ink-soft); }
.hmr-home .cat-list a:hover { color: var(--brand); text-decoration: none; }
.hmr-home .cat-list span {
  font-size: .76rem;
  color: var(--muted);
  background: var(--bg-alt);
  border-radius: 3px;
  padding: 2px 8px;
  flex: 0 0 auto;
}

.hmr-home .recent-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.hmr-home .recent-list li:last-child { border-bottom: 0; }
.hmr-home .recent-list a {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: .96rem;
  line-height: 1.35;
  margin-bottom: 3px;
}
.hmr-home .recent-list a:hover { color: var(--brand); text-decoration: none; }

/* ---------- Thumbnail edge cases ---------- */

/* No image anywhere in the post. */
.hmr-home .card-thumb--empty {
  background: linear-gradient(135deg, var(--brand-tint), var(--bg-alt));
}

/* Small square brand logos: show whole, never crop to fill. */
.hmr-home .card-thumb--logo {
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.hmr-home .card-thumb--logo img {
  object-fit: contain;
  padding: 14%;
}
.hmr-home .card:hover .card-thumb--logo img { transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 992px) {
  .hmr-home .layout { grid-template-columns: 1fr; gap: 40px; }
  .hmr-home .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .hmr-home .popular-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .hmr-home h1 { font-size: 1.7rem; }
  .hmr-home .grid-6,
  .hmr-home .popular-list { grid-template-columns: 1fr; }
  .hmr-home .feed-item { grid-template-columns: 1fr; gap: 14px; }
  .hmr-home .section-head { flex-wrap: wrap; gap: 8px; }
}

/* Long review titles must never push the layout sideways. */
.hmr-home .card-title,
.hmr-home .card-excerpt,
.hmr-home .feed-item h3,
.hmr-home .recent-list a {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Comfortable tap targets on touch devices. */
@media (hover: none) and (pointer: coarse) {
  .hmr-home .cat-list a,
  .hmr-home .recent-list a { padding-top: 4px; padding-bottom: 4px; }
  .hmr-home .readmore { display: inline-block; padding: 6px 0; }
}
