/* =========================================================
   SM Home Rotator Pro — Frontend Styles v3.0.0
   Design direction: Editorial magazine — ink-black accents,
   warm off-white backgrounds, sharp typographic hierarchy,
   micro-motion on hover, staggered entrance animations.
   ========================================================= */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --smhrp-ink:        #0d0d0d;
  --smhrp-ink-2:      #1a1a1a;
  --smhrp-ink-soft:   #4b5563;
  --smhrp-ink-muted:  #9ca3af;
  --smhrp-surface:    #fafaf9;
  --smhrp-border:     #e5e5e4;
  --smhrp-accent:     #e84e0f;       /* warm vermilion — stops the eye */
  --smhrp-accent-2:   #f97316;       /* amber for secondary emphasis   */
  --smhrp-card-bg:    #ffffff;
  --smhrp-radius-lg:  20px;
  --smhrp-radius-md:  14px;
  --smhrp-radius-sm:  8px;
  --smhrp-shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --smhrp-shadow-md:  0 6px 24px rgba(0,0,0,.09);
  --smhrp-shadow-lg:  0 16px 48px rgba(0,0,0,.13);
  --smhrp-font-head:  'Georgia', 'Times New Roman', serif;
  --smhrp-font-ui:    system-ui, -apple-system, 'Segoe UI', sans-serif;
  --smhrp-transition: 240ms cubic-bezier(.4,0,.2,1);
}

/* ── Wrapper ─────────────────────────────────────────────── */
.smhrp-wrap {
  margin: 36px 0;
  padding: 28px 28px 32px;
  background: var(--smhrp-surface);
  border: 1px solid var(--smhrp-border);
  border-radius: var(--smhrp-radius-lg);
  box-shadow: var(--smhrp-shadow-sm);
  font-family: var(--smhrp-font-ui);
}

/* ── Header row ──────────────────────────────────────────── */
.smhrp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.smhrp-title {
  margin: 0 0 4px;
  font-family: var(--smhrp-font-head);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--smhrp-ink);
  line-height: 1.08;
}
.smhrp-title::after {
  content: '.';
  color: var(--smhrp-accent);
}
.smhrp-sub {
  margin: 0;
  color: var(--smhrp-ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Browse button ───────────────────────────────────────── */
.smhrp-browse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--smhrp-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  border-radius: var(--smhrp-radius-sm);
  white-space: nowrap;
  transition: background var(--smhrp-transition), transform var(--smhrp-transition);
}
.smhrp-browse:hover {
  background: var(--smhrp-accent);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

/* ── HERO ────────────────────────────────────────────────── */
.smhrp-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  margin-bottom: 24px;
  border-radius: var(--smhrp-radius-lg);
  overflow: hidden;
  border: 1px solid var(--smhrp-border);
  background: var(--smhrp-ink-2);
  box-shadow: var(--smhrp-shadow-md);
  min-height: 380px;
}

.smhrp-hero-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.smhrp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(.25,.46,.45,.94);
  min-height: 380px;
}
.smhrp-hero-img-wrap:hover .smhrp-hero-img {
  transform: scale(1.04);
}
.smhrp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(26,26,26,.4) 100%);
  pointer-events: none;
}

.smhrp-hero-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
  background: var(--smhrp-ink-2);
  color: #fff;
}

/* ── Badges ──────────────────────────────────────────────── */
.smhrp-badges,
.smhrp-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.smhrp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
}
.smhrp-badge-hot {
  background: var(--smhrp-accent);
  border-color: var(--smhrp-accent);
}
.smhrp-badge-cat {
  background: transparent;
  border-color: rgba(255,255,255,.3);
}
.smhrp-badge-clicks {
  background: transparent;
  border-color: rgba(249,115,22,.5);
  color: var(--smhrp-accent-2);
}

/* On white cards, badges use dark scheme */
.smhrp-card .smhrp-badge {
  background: var(--smhrp-ink);
  color: #fff;
  border-color: transparent;
}
.smhrp-card .smhrp-chip {
  background: #f1f5f9;
  color: var(--smhrp-ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid var(--smhrp-border);
}

.smhrp-mini {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--smhrp-accent);
  margin-bottom: 10px;
}

.smhrp-hero-title {
  display: block;
  font-family: var(--smhrp-font-head);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  margin-bottom: 14px;
  letter-spacing: -.02em;
  transition: color var(--smhrp-transition);
}
.smhrp-hero-title:hover {
  color: var(--smhrp-accent-2);
  text-decoration: none;
}

.smhrp-excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,.72);
  margin: 0 0 18px;
}

/* ── Meta row ────────────────────────────────────────────── */
.smhrp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.smhrp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}

/* ── CTA button (hero) ───────────────────────────────────── */
.smhrp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 13px 20px;
  background: var(--smhrp-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  text-decoration: none;
  border-radius: var(--smhrp-radius-sm);
  transition: background var(--smhrp-transition), transform var(--smhrp-transition), box-shadow var(--smhrp-transition);
}
.smhrp-cta:hover {
  background: #c73d07;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232,78,15,.35);
  color: #fff;
  text-decoration: none;
}
.smhrp-cta svg {
  transition: transform var(--smhrp-transition);
}
.smhrp-cta:hover svg {
  transform: translateX(3px);
}

/* ── GRID ────────────────────────────────────────────────── */
.smhrp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

/* ── Card ────────────────────────────────────────────────── */
.smhrp-card {
  background: var(--smhrp-card-bg);
  border: 1px solid var(--smhrp-border);
  border-radius: var(--smhrp-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--smhrp-shadow-sm);
  transition: transform var(--smhrp-transition), box-shadow var(--smhrp-transition), border-color var(--smhrp-transition);
  will-change: transform;
}
.smhrp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--smhrp-shadow-lg);
  border-color: #d1d5db;
}

/* Entrance animation */
.smhrp-animate .smhrp-card {
  opacity: 0;
  transform: translateY(18px);
  animation: smhrp-rise 480ms ease forwards;
  animation-delay: var(--smhrp-delay, 0ms);
}
.smhrp-animate .smhrp-hero {
  opacity: 0;
  animation: smhrp-rise 550ms ease forwards;
}
@keyframes smhrp-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Card image */
.smhrp-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
}
.smhrp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(.25,.46,.45,.94);
}
.smhrp-img-wrap:hover .smhrp-img {
  transform: scale(1.06);
}
.smhrp-img-stat {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* Card body */
.smhrp-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.smhrp-h {
  display: block;
  font-family: var(--smhrp-font-head);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--smhrp-ink);
  text-decoration: none;
  letter-spacing: -.01em;
  transition: color var(--smhrp-transition);
}
.smhrp-h:hover {
  color: var(--smhrp-accent);
  text-decoration: none;
}
.smhrp-copy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--smhrp-ink-soft);
  margin: 0;
}
.smhrp-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.smhrp-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.smhrp-meta-sm {
  font-size: 11px;
  color: var(--smhrp-ink-muted);
  font-weight: 600;
}
.smhrp-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--smhrp-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  border-radius: var(--smhrp-radius-sm);
  white-space: nowrap;
  transition: background var(--smhrp-transition), transform var(--smhrp-transition);
}
.smhrp-btn:hover {
  background: var(--smhrp-accent);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

/* ── Inline SEO links ────────────────────────────────────── */
.smhrp-inline-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0,0,0,.25);
}
.smhrp-inline-link:hover {
  color: var(--smhrp-accent);
  text-decoration-color: var(--smhrp-accent);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .smhrp-hero {
    grid-template-columns: 1fr;
    min-height: unset;
  }
  .smhrp-hero-img { min-height: 260px; }
  .smhrp-hero-body { padding: 24px 20px; }
  .smhrp-hero-title { font-size: 24px; }
}
@media (max-width: 640px) {
  .smhrp-wrap { padding: 18px 16px 22px; }
  .smhrp-head { flex-direction: column; align-items: flex-start; }
  .smhrp-grid { grid-template-columns: 1fr; }
  .smhrp-hero { border-radius: var(--smhrp-radius-md); }
}
@media (prefers-reduced-motion: reduce) {
  .smhrp-animate .smhrp-card,
  .smhrp-animate .smhrp-hero { animation: none; opacity: 1; transform: none; }
  .smhrp-card { transition: none; }
  .smhrp-hero-img, .smhrp-img { transition: none; }
}
