/* ==========================================================================
   Onnax Tools — Homepage & Category pages (home.css)
   ========================================================================== */

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 84px; overflow: hidden; background: var(--grad-soft); }
.hero__inner { position: relative; z-index: 2; max-width: 820px; margin-inline: auto; text-align: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .accent { position: relative; color: var(--c-primary-dark); }
.hero h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px;
  background: rgba(24,197,200,.28); border-radius: 6px; z-index: -1;
}
.hero__sub { font-size: 1.13rem; max-width: 620px; margin: 0 auto 30px; }
.hero__search { max-width: 560px; margin: 0 auto 26px; }
.hero__search input { padding: 1rem 1.2rem 1rem 3rem; font-size: 1rem; box-shadow: var(--shadow-md); background: #fff; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 38px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.hero__stats .stat { text-align: center; }
.hero__stats .stat b { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--c-secondary); }
.hero__stats .stat span { font-size: .84rem; color: var(--c-text-faint); }

/* Floating file badges */
.hero__float { position: absolute; z-index: 1; pointer-events: none; }
.float-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: .55rem .95rem;
  background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(230,234,240,.9); border-radius: var(--r-md);
  font-family: var(--font-head); font-weight: 700; font-size: .82rem;
  box-shadow: var(--shadow-md); will-change: transform;
  animation: chipFloat 5.4s ease-in-out infinite;
}
.float-chip i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: .68rem; }
.chip--pdf i { background: #EF4444; } .chip--jpg i { background: #F59E0B; }
.chip--png i { background: #3B82F6; } .chip--webp i { background: #21C55D; }
.chip--svg i { background: #8B5CF6; } .chip--gif i { background: #EC4899; }
@keyframes chipFloat { 50% { transform: translateY(-16px) rotate(3deg); } }
.hero__float:nth-of-type(1) { top: 18%; left: 6%; }
.hero__float:nth-of-type(2) { top: 58%; left: 3%; animation-delay: .8s; }
.hero__float:nth-of-type(3) { top: 12%; right: 8%; }
.hero__float:nth-of-type(4) { top: 52%; right: 4%; }
.hero__float:nth-of-type(5) { bottom: 8%; left: 14%; }
.hero__float:nth-of-type(6) { bottom: 12%; right: 14%; }
.hero__float:nth-of-type(2) .float-chip { animation-delay: .7s; }
.hero__float:nth-of-type(3) .float-chip { animation-delay: 1.3s; }
.hero__float:nth-of-type(4) .float-chip { animation-delay: 2s; }
.hero__float:nth-of-type(5) .float-chip { animation-delay: 2.6s; }
.hero__float:nth-of-type(6) .float-chip { animation-delay: 3.2s; }

/* Background blobs */
.hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.hero__blob--1 { width: 480px; height: 480px; background: rgba(24,197,200,.35); top: -180px; right: -140px; animation: blobDrift 11s ease-in-out infinite; }
.hero__blob--2 { width: 380px; height: 380px; background: rgba(31,162,222,.25); bottom: -160px; left: -120px; animation: blobDrift 13s ease-in-out infinite reverse; }
@keyframes blobDrift { 50% { transform: translate(30px, 24px) scale(1.07); } }

/* ---------- Category showcase ---------- */
.cat-card {
  position: relative; border-radius: var(--r-lg); padding: 30px 26px; overflow: hidden;
  background: #fff; border: 1px solid var(--c-border);
  transition: transform var(--t-med), box-shadow var(--t-med);
  display: flex; flex-direction: column; gap: 10px;
}
.cat-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.cat-card__icon { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; font-size: 1.5rem; background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-glow); }
.cat-card h3 a { color: inherit; }
.cat-card h3 a::after { content: ""; position: absolute; inset: 0; }
.cat-card p { font-size: .9rem; flex: 1; }
.cat-card .count { font-size: .8rem; font-weight: 700; color: var(--c-primary-dark); }

/* ---------- How it works ---------- */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.how-step { text-align: center; padding: 30px 22px; background: #fff; border-radius: var(--r-lg); border: 1px solid var(--c-border); position: relative; }
.how-step__n {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; font-family: var(--font-head); font-size: 1.3rem; font-weight: 700;
  display: grid; place-items: center; box-shadow: var(--shadow-glow);
}
.how-step h3 { margin-bottom: 8px; }
.how-step p { font-size: .9rem; }

/* ---------- Testimonials ---------- */
.testimonial { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.testimonial .stars { color: var(--c-warning); letter-spacing: 2px; }
.testimonial blockquote { font-size: .95rem; color: var(--c-text-soft); font-style: italic; }
.testimonial .who { display: flex; align-items: center; gap: 12px; }
.testimonial .who .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); }
.testimonial .who b { display: block; font-size: .92rem; color: var(--c-text); }
.testimonial .who span { font-size: .8rem; color: var(--c-text-faint); }

/* ---------- Why choose ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { padding: 26px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--c-border); transition: var(--t-med); }
.why-card:hover { border-color: rgba(24,197,200,.55); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.why-card .ic { width: 46px; height: 46px; border-radius: 13px; background: var(--c-primary-light); color: var(--c-primary-dark); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 14px; }
.why-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.why-card p { font-size: .9rem; }

/* ---------- Category page header ---------- */
.cat-hero { background: var(--grad-soft); padding: 56px 0 46px; text-align: center; }
.cat-hero p { max-width: 640px; margin: 12px auto 0; font-size: 1.05rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 30px 0 24px; }
.filter-bar .search-box { flex: 1; min-width: 220px; max-width: 380px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 34px; }
.filter-tabs button {
  padding: .5rem 1.2rem; border-radius: var(--r-full); border: 1.5px solid var(--c-border);
  background: #fff; font-size: .88rem; font-weight: 600; cursor: pointer; transition: var(--t-fast); color: var(--c-text-soft);
}
.filter-tabs button:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.filter-tabs button.is-active { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }

/* ---------- 404 ---------- */
.err-page { text-align: center; padding: 90px 0; }
.err-page .code { font-family: var(--font-head); font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Blog ---------- */
.post-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; transition: var(--t-med); display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-card__banner { height: 150px; background: var(--grad-brand); display: grid; place-items: center; color: #fff; font-size: 2.4rem; }
.post-card__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__body h3 { font-size: 1.08rem; }
.post-card__body h3 a { color: inherit; }
.post-card__body p { font-size: .9rem; flex: 1; }
.post-card__meta { font-size: .78rem; color: var(--c-text-faint); }

/* ---------- About timeline ---------- */
.timeline { position: relative; max-width: 720px; margin-inline: auto; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--c-primary), rgba(24,197,200,.15)); }
.timeline .tl-item { position: relative; padding-bottom: 30px; }
.timeline .tl-item::before { content: ""; position: absolute; left: -30px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--c-primary); box-shadow: 0 0 0 5px rgba(24,197,200,.2); }
.timeline .tl-item b { font-family: var(--font-head); color: var(--c-primary-dark); font-size: .85rem; letter-spacing: .06em; }
.timeline .tl-item h3 { margin: 4px 0 6px; }

@media (max-width: 860px) {
  .how-grid, .why-grid { grid-template-columns: 1fr; }
  .hero__float { display: none; }
  .hero { padding: 64px 0 56px; }
}
