/* Trang chủ OneTool */

body[data-tool="home"] main {
  overflow-x: hidden;
}

/* ─── Hero ─── */
.home-hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  background:
    radial-gradient(ellipse 90% 70% at 15% -20%, rgba(124, 58, 237, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 95% 10%, rgba(6, 182, 212, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(236, 72, 153, 0.06), transparent 50%),
    #f8f7ff;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(124, 58, 237, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(124, 58, 237, 0.15);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.home-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.home-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.home-hero h1 .gradient-text {
  display: inline-block;
  margin-top: 0.15rem;
}

.home-hero-lead {
  margin: 0 0 1rem;
  max-width: 46ch;
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.68;
}

.home-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
}

.home-hero-points li {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.home-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-stat span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.home-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.home-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(124, 58, 237, 0.1);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  color: var(--text) !important;
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.home-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
}

.home-tile em {
  font-style: normal;
  font-size: 1.5rem;
}

.home-tile--accent {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(6, 182, 212, 0.08));
}

.home-tile--accent div {
  flex: 1;
}

.home-tile--accent small {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

/* ─── Category strip ─── */
.home-cats {
  padding: 1rem 0 1.25rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.06);
}

.home-cats-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.home-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.home-cat-chip:hover {
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ─── Sections ─── */
.home-section {
  padding: 2.25rem 0;
}

.home-section--alt {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.03) 0%, transparent 100%);
}

.home-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.home-section-head h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.home-section-sub {
  margin: 0.35rem 0 0;
  max-width: 42ch;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.home-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

/* ─── Showcase — danh mục theo hàng (mẫu thumbnail + tên) ─── */
.home-showcase {
  padding: 2rem 0 2.5rem;
  background: #fff;
}

[data-theme="dark"] .home-showcase {
  background: var(--bg);
}

.home-cat-row {
  margin-bottom: 2.5rem;
}

.home-cat-row:last-child {
  margin-bottom: 0;
}

.home-cat-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2b6cb0;
}

.home-cat-row-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #2b6cb0;
  text-transform: uppercase;
}

.home-cat-row-all {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2b6cb0 !important;
  text-decoration: none;
  transition: opacity 0.15s;
}

.home-cat-row-all:hover {
  opacity: 0.75;
}

.home-cat-row-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* Tool card — icon thay ảnh, giống card công cụ */
.home-cat-row-grid .tool-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem;
  min-height: 100%;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.home-cat-row-grid .tool-card-icon {
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.12);
}

.home-cat-row-grid .tool-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

.home-cat-row-grid .tool-card-category {
  font-size: 0.68rem;
}

.home-cat-row-grid .tool-card-title {
  font-size: 0.95rem;
  margin: 0.2rem 0 0.3rem;
}

.home-cat-row-grid .tool-card-desc {
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
  flex: 1;
  -webkit-line-clamp: 2;
}

.home-cat-row-grid .tool-card-footer {
  width: 100%;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-cat-row-grid .tool-card-footer .btn {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.72rem !important;
  white-space: nowrap;
}

[data-theme="dark"] .home-cat-row-grid .tool-card-icon {
  background: rgba(124, 58, 237, 0.18);
}

[data-theme="dark"] .home-cat-row-head {
  border-bottom-color: #63b3ed;
}

[data-theme="dark"] .home-cat-row-title,
[data-theme="dark"] .home-cat-row-all {
  color: #63b3ed !important;
}

.home-quick-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text) !important;
  text-decoration: none;
  transition: all 0.22s;
  box-shadow: var(--shadow-sm);
}

.home-quick-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.home-quick-card em {
  font-style: normal;
  font-size: 1.65rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary-light);
  flex-shrink: 0;
}

.home-quick-card strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  margin-bottom: 0.1rem;
}

.home-quick-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Legacy tool grid on home (cong-cu hub) */
body[data-tool="home"] .tool-category-block {
  margin-bottom: 2rem !important;
}

body[data-tool="home"] .tool-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

body[data-tool="home"] .tool-category-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body[data-tool="home"] .tool-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

body[data-tool="home"] .tool-card {
  padding: 1.15rem;
  gap: 0.85rem;
  border-radius: 14px;
}

body[data-tool="home"] .tool-card-icon {
  width: 46px;
  height: 46px;
  font-size: 1.45rem;
}

body[data-tool="home"] .tool-card-title {
  font-size: 1rem;
}

body[data-tool="home"] .tool-card-desc {
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-tool="home"] .tool-card-footer .btn {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.78rem !important;
}

/* Steps */
.home-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.home-step {
  padding: 1.25rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.home-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 0.65rem;
  border-radius: 8px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.home-step h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 750;
}

.home-step p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Trust */
.home-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.home-trust-item {
  padding: 1rem;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
}

.home-trust-item em {
  display: block;
  font-style: normal;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.home-trust-item strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.home-trust-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* CTA band */
.home-cta {
  padding: 2rem 0 3rem;
}

.home-cta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 45%, #0891b2 100%);
  color: #fff;
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.28);
}

.home-cta-box h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-cta-box p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.92rem;
}

.home-cta-box .btn {
  background: #fff !important;
  color: var(--primary-dark) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
}

@media (max-width: 900px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-quick-grid,
  .home-steps,
  .home-cat-row-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-trust {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .home-visual {
    display: none;
  }
}

@media (max-width: 560px) {
  .home-quick-grid,
  .home-steps {
    grid-template-columns: 1fr;
  }

  .home-cat-row-grid {
    grid-template-columns: 1fr;
  }

  .home-tile--accent {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
  }
}
