/*
Theme Name: RankHub Magazine
Theme URI: http://localhost:8092
Author: RankHub Team
Description: Giao diện tạp chí công nghệ & SEO tốc độ cao, tối ưu cấu trúc Semantic HTML5 và tích hợp sâu với SEO Rank Hub.
Version: 1.0.0
Text Domain: rankhub-magazine
*/

:root {
  --rh-bg: #f8fafc;
  --rh-surface: #ffffff;
  --rh-text: #0f172a;
  --rh-muted: #475569;
  --rh-subtle: #64748b;
  --rh-border: #e2e8f0;
  --rh-primary: #4f46e5;
  --rh-primary-hover: #4338ca;
  --rh-primary-soft: #eef2ff;
  --rh-accent: #0ea5e9;
  --rh-radius: 14px;
  --rh-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--rh-bg);
  color: var(--rh-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--rh-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--rh-primary-hover);
}

.rh-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.rh-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rh-border);
}

.rh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.rh-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--rh-text);
  letter-spacing: -0.02em;
}

.rh-brand:hover {
  color: var(--rh-text);
}

.rh-brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}

.rh-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.rh-nav a {
  color: var(--rh-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.rh-nav a:hover {
  color: var(--rh-primary);
}

.rh-header-cta {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--rh-primary-soft);
  color: var(--rh-primary) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
}

/* Hero Banner */
.rh-home-intro {
  padding: 36px 0 8px;
}
.rh-home-intro h1 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--rh-text);
}
.rh-home-intro p {
  margin: 0;
  max-width: 860px;
  color: var(--rh-muted);
  font-size: 1.02rem;
}

.rh-hero {
  padding: 26px 0 32px;
}

.rh-hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
  color: #fff;
  border-radius: 22px;
  padding: 44px;
  box-shadow: 0 18px 40px -12px rgba(30, 27, 75, 0.35);
  position: relative;
  overflow: hidden;
}

.rh-hero-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.rh-hero-card h1,
.rh-hero-card h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.rh-hero-card h2 a {
  color: #fff;
}

.rh-hero-card h2 a:hover {
  color: #c7d2fe;
}

.rh-hero-excerpt {
  color: #cbd5e1;
  max-width: 720px;
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.rh-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--rh-subtle);
}

.rh-hero-card .rh-meta-row {
  color: #94a3b8;
}

/* Post Grid */
.rh-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 16px 0 24px;
  letter-spacing: -0.015em;
}

.rh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px;
  margin-bottom: 60px;
}

.rh-card {
  background: var(--rh-surface);
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--rh-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rh-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.1);
}

.rh-card-thumb-link {
  display: block;
  margin: -26px -26px 18px;
  overflow: hidden;
  border-radius: var(--rh-radius) var(--rh-radius) 0 0;
  border-bottom: 1px solid var(--rh-border);
}
.rh-card-thumb {
  display: block;
  width: 100%;
  height: 185px;
  object-fit: cover;
}
.rh-read-link {
  font-weight: 700;
  font-size: 0.85rem;
}

.rh-cat-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--rh-primary-soft);
  color: var(--rh-primary);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.rh-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.4;
}

.rh-card h3 a {
  color: var(--rh-text);
}

.rh-card h3 a:hover {
  color: var(--rh-primary);
}

.rh-card-excerpt {
  color: var(--rh-muted);
  font-size: 0.94rem;
  margin-bottom: 18px;
}

/* Breadcrumbs */
.rh-breadcrumbs-wrap {
  margin: 28px 0 16px;
  font-size: 0.875rem;
  color: var(--rh-subtle);
}

.srh-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.srh-breadcrumbs .srh-sep {
  color: #94a3b8;
}

/* Single Article */
.rh-article-shell {
  max-width: 820px;
  margin: 24px auto 64px;
  background: var(--rh-surface);
  border: 1px solid var(--rh-border);
  border-radius: 20px;
  padding: 44px 48px;
  box-shadow: var(--rh-shadow);
}

.rh-article-header h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 10px 0 18px;
}

.rh-entry-content {
  margin-top: 28px;
  font-size: 1.06rem;
  color: #1e293b;
}

.rh-entry-content h2 {
  font-size: 1.55rem;
  margin: 2em 0 0.75em;
  color: var(--rh-text);
  letter-spacing: -0.015em;
}

.rh-entry-content h3 {
  font-size: 1.25rem;
  margin: 1.6em 0 0.6em;
  color: var(--rh-text);
}

.rh-entry-content p {
  margin: 0 0 1.25em;
}

.rh-entry-content ul,
.rh-entry-content ol {
  margin: 0 0 1.35em;
  padding-left: 1.5em;
}

.rh-entry-content li {
  margin-bottom: 0.45em;
}

.rh-entry-content blockquote {
  margin: 1.5em 0;
  padding: 16px 22px;
  border-left: 4px solid var(--rh-primary);
  background: #f8fafc;
  border-radius: 0 10px 10px 0;
  color: var(--rh-muted);
  font-style: italic;
}

.rh-entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 16px 0;
}

/* Footer */
.rh-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 36px;
  margin-top: 64px;
}

.rh-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.rh-footer h4,
.rh-footer .rh-footer-heading {
  color: #fff;
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
}

.rh-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rh-footer li {
  margin-bottom: 8px;
}

.rh-footer a {
  color: #94a3b8;
  font-size: 0.92rem;
}

.rh-footer a:hover {
  color: #fff;
}

.rh-footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .rh-article-shell {
    padding: 28px 22px;
  }
  .rh-hero-card {
    padding: 28px 24px;
  }
  .rh-footer-grid {
    grid-template-columns: 1fr;
  }
}
