/* ============================================================
   MIKOMI — LEARNING HUB
   Additive styles only. Inherits every token, button, heading,
   card and animation from style.css. Nothing here overrides
   the existing design system.
   ============================================================ */

/* ---------- Hub hero ---------- */
.hub-hero {
  position: relative;
  padding: 150px 0 76px;
  background:
    radial-gradient(900px 460px at 80% -14%, var(--red-soft), transparent 62%),
    linear-gradient(180deg, #fff, #fff 60%, var(--grey));
  overflow: hidden;
  text-align: center;
}
.hub-hero .container { position: relative; z-index: 2; }
.hub-hero h1 { margin-bottom: 1rem; }
.hub-hero-sub {
  font-size: 1.1rem; color: var(--muted);
  max-width: 680px; margin: 0 auto 2.1rem;
}

/* Search */
.hub-search {
  position: relative;
  max-width: 560px; margin: 0 auto 1.8rem;
}
.hub-search input {
  width: 100%; font-family: var(--font); font-size: 1rem; color: var(--ink);
  padding: 1.05rem 1.5rem 1.05rem 3.1rem;
  border: 1px solid var(--line); border-radius: 100px;
  background: #fff; box-shadow: var(--shadow-md);
  transition: border-color .25s, box-shadow .25s;
}
.hub-search input::placeholder { color: #b3afab; }
.hub-search input:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(230,0,18,.12), var(--shadow-md);
}
.hub-search-icon {
  position: absolute; left: 1.3rem; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; opacity: .5; pointer-events: none;
}

/* Mini stat row */
.hub-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.4rem; }
.hub-stats .stat { display: flex; flex-direction: column; }
.hub-stats .counter { font-size: 1.7rem; font-weight: 800; color: var(--black); line-height: 1; }
.hub-stats small { color: var(--muted); font-size: .82rem; margin-top: .25rem; }

/* ---------- Category chips ---------- */
.hub-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
}
.hub-cat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.5rem 1rem; text-align: center; box-shadow: var(--shadow-sm);
  cursor: pointer; font-family: var(--font);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.hub-cat:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.hub-cat.active { border-color: var(--red); box-shadow: var(--shadow-md); }
.hub-cat-icon {
  width: 54px; height: 54px; margin: 0 auto .7rem; border-radius: 16px;
  background: var(--red-soft); display: grid; place-items: center; font-size: 1.6rem;
}
.hub-cat h3 { font-size: .93rem; margin-bottom: .15rem; }
.hub-cat p { font-size: .76rem; color: var(--muted); }

/* ---------- Featured article (large) ---------- */
.hub-featured {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.hub-featured-cover {
  position: relative; min-height: 320px;
  background: linear-gradient(150deg, #1a1614, #3a201c 55%, var(--red-dark));
  display: grid; place-items: center; overflow: hidden;
}
.hub-featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-featured-copy { padding: 2.6rem 2.6rem 2.4rem; display: flex; flex-direction: column; justify-content: center; }
.hub-featured-tag {
  display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--red); padding: .4rem .9rem; border-radius: 100px;
  margin-bottom: 1rem;
}
.hub-featured-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .9rem; }
.hub-featured-copy p { color: var(--muted); font-size: 1rem; margin-bottom: 1.4rem; }
.hub-featured-meta {
  display: flex; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: var(--muted);
  margin-bottom: 1.5rem;
}
.hub-featured-meta span { display: inline-flex; align-items: center; gap: .35rem; }

/* ---------- Trending rail ---------- */
.hub-trending {
  display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .6rem;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.hub-trending::-webkit-scrollbar { height: 6px; }
.hub-trending::-webkit-scrollbar-thumb { background: var(--line); border-radius: 100px; }
.hub-trend-card {
  scroll-snap-align: start; flex: 0 0 auto; width: 260px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hub-trend-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.hub-trend-num { font-family: var(--font-jp); font-size: 1.6rem; color: var(--red); font-weight: 700; }
.hub-trend-card h4 { font-size: .95rem; margin: .5rem 0 .3rem; line-height: 1.35; }
.hub-trend-card small { color: var(--muted); font-size: .78rem; }

/* ---------- Article grid ---------- */
.hub-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.hub-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.hub-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.hub-card.is-soon { filter: none; }

.hub-cover {
  position: relative; aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, #fdf6ec, #f7e4d7);
  overflow: hidden; display: grid; place-items: center;
}
.hub-cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-cover-glyph {
  font-family: var(--font-jp); font-size: 3.4rem; color: var(--red-dark); opacity: .88; line-height: 1;
}
.hub-badge-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(20,17,15,.82); color: #fff;
  font-size: .66rem; font-weight: 600; letter-spacing: .06em;
  padding: .32rem .7rem; border-radius: 100px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hub-badge-soon {
  position: absolute; top: 12px; right: 12px;
  background: var(--grey-2); color: var(--muted);
  font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .32rem .7rem; border-radius: 100px;
}

.hub-card-body { padding: 1.3rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.hub-card-body h3 { font-size: 1.04rem; margin-bottom: .5rem; line-height: 1.35; }
.hub-card-desc { font-size: .9rem; color: var(--muted); flex: 1; margin-bottom: 1rem; }
.hub-meta { display: flex; align-items: center; gap: .9rem; font-size: .78rem; color: var(--muted); margin-bottom: 1rem; }
.hub-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.hub-card-cta { font-size: .88rem; font-weight: 700; color: var(--red); display: inline-flex; align-items: center; gap: .35rem; }
.hub-card-cta.is-disabled { color: var(--muted); }

/* ---------- Newsletter / WhatsApp CTA band ---------- */
.hub-cta-band {
  background: linear-gradient(135deg, var(--black), #241d1a);
  border-radius: var(--radius); padding: 2.6rem 2rem; text-align: center;
  color: #fff;
}
.hub-cta-band h2 { color: #fff; margin-bottom: .7rem; }
.hub-cta-band p { color: rgba(255,255,255,.78); max-width: 520px; margin: 0 auto 1.6rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hub-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-article-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-featured { grid-template-columns: 1fr; }
  .hub-featured-cover { min-height: 220px; }
}
@media (max-width: 760px) {
  .hub-hero { padding: 122px 0 56px; }
  .hub-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-article-grid { grid-template-columns: 1fr; }
  .hub-featured-copy { padding: 2rem 1.5rem; }
  .hub-stats { gap: 1.6rem; }
}
@media (max-width: 420px) {
  .hub-cat-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-card:hover, .hub-cat:hover, .hub-trend-card:hover { transform: none; }
}
