/* ═══ Mummy Redesign — Design System ═══ */
:root {
  --color-brand-blue: #3db5da;
  --color-brand-blue-dark: #0068a0;
  --color-brand-blue-light: #e8f6fb;
  --color-accent-pink: #f2bfbf;
  --color-accent-pink-light: #fef0ef;
  --color-accent-orange: #FF6550;
  --color-accent-orange-light: rgba(255,101,80,0.09);
  --color-text-primary: #1f2124;
  --color-text-secondary: #636363;
  --color-text-tertiary: #808285;
  --color-border: #e6e6e6;
  --color-border-light: #f1f1f1;
  --color-bg-white: #ffffff;
  --color-bg-light: #f9fafb;
  --color-fb: #1877f2;
  --color-line: #06c755;
  --font-primary: "Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  --header-height: 56px;
  --bottom-nav-height: 56px;
  --container-max: 1200px;
  --container-padding: 16px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-bottom-nav: 0 -1px 8px rgba(0,0,0,0.08);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
}

/* Reset for our templates */
.mummy-page { font-family: var(--font-primary); color: var(--color-text-primary); -webkit-font-smoothing: antialiased; }
.mummy-page *, .mummy-page *::before, .mummy-page *::after { box-sizing: border-box; }

/* ══ Header (v2 — brand blue) ══ */
.mummy-header {
  position: sticky; top: 0; z-index: 100;
  background: #3db5da;
  height: 56px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.mummy-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.mummy-header__logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.mummy-header__logo img { height: 40px; width: auto; filter: brightness(1.1); }
.mummy-header__logo-text {
  color: #fff; font-size: 17px; font-weight: 700;
  letter-spacing: 0.5px; white-space: nowrap;
}
.mummy-header__nav { display: none; gap: 22px; }
.mummy-header__nav a, .mummy-header__link {
  color: rgba(255,255,255,0.8); text-decoration: none;
  font-size: 14px; font-weight: 500; padding: 6px 0;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.mummy-header__nav a:hover, .mummy-header__nav a.active,
.mummy-header__link:hover, .mummy-header__link--active {
  color: #fff; border-bottom-color: #fff;
}
.mummy-header__search-btn {
  background: none; border: none; color: #fff; cursor: pointer; padding: 8px;
}
.mummy-header__search {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; padding: 12px 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.mummy-header__search input {
  width: 100%; padding: 12px 16px; border: 1px solid #e6e6e6;
  border-radius: 10px; font-size: 15px; outline: none; font-family: var(--font-primary);
}
.mummy-header__search input:focus { border-color: #3db5da; }
@media (min-width:1024px) {
  .mummy-header__nav { display: flex; }
  .mummy-header__logo img { height: 44px; }
  .mummy-header__logo-text { font-size: 18px; }
}
@media (max-width:374px) { .mummy-header__logo-text { display: none; } }

/* ══ Stage Selector ══ */
.stage-selector { background: #e8f6fb; padding: 12px 16px; }
.stage-selector__inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 8px; }
.stage-selector__btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 6px; border: 1px solid #e6e6e6; border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 500; color: #636363;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-primary); white-space: nowrap;
}
.stage-selector__btn--active { background: #3db5da; color: #fff; border-color: #3db5da; }
.stage-selector__btn:hover:not(.stage-selector__btn--active) { border-color: #3db5da; color: #0068a0; }
.stage-selector__icon { font-size: 16px; line-height: 1; }
@media (min-width:768px) {
  .stage-selector__inner { max-width: 600px; }
  .stage-selector__btn { font-size: 14px; padding: 10px 20px; }
}

/* ══ Tool Hub (v2 — colorful icons) ══ */
.tool-hub { padding: 24px 16px; background: #fff; }
.tool-hub__inner { max-width: 1200px; margin: 0 auto; }
.tool-hub__title { font-size: 14px; font-weight: 700; color: #0068a0; margin-bottom: 16px; }
.tool-hub__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; text-align: center; }
.tool-hub__item {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; padding: 8px; border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tool-hub__item:active { transform: scale(0.96); }
.tool-hub__item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.tool-hub__icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 8px;
}
.tool-hub__icon--mama-classroom { background: #f2bfbf; box-shadow: 0 3px 10px rgba(242,191,191,0.4); }
.tool-hub__icon--handbook { background: #e8f6fb; box-shadow: 0 3px 10px rgba(61,181,218,0.2); }
.tool-hub__icon--pregnancy { background: #FFF3E0; box-shadow: 0 3px 10px rgba(255,152,0,0.15); }
.tool-hub__icon--subsidy { background: #e1f5ee; box-shadow: 0 3px 10px rgba(29,158,117,0.15); }
.tool-hub__icon--food { background: #fef0ef; box-shadow: 0 3px 10px rgba(242,191,191,0.3); }
.tool-hub__icon--vaccine { background: #E8EAF6; box-shadow: 0 3px 10px rgba(92,107,192,0.15); }
.tool-hub__label { font-size: 14px; font-weight: 500; color: #1f2124; }
.tool-hub__sublabel { font-size: 12px; color: #808285; margin-top: 2px; }
@media (min-width:768px) {
  .tool-hub__grid { max-width: 580px; margin: 0 auto; gap: 28px; }
  .tool-hub__icon { width: 64px; height: 64px; font-size: 26px; }
}
@media (min-width:1024px) {
  .tool-hub__grid { max-width: 720px; gap: 36px; }
  .tool-hub__icon { width: 72px; height: 72px; font-size: 28px; }
}

/* ══ Community Entry (v2 — number emphasis) ══ */
.community-entry { padding: 20px 16px; background: #f9fafb; }
.community-entry__inner { max-width: 1200px; margin: 0 auto; }
.community-entry__title { font-size: 14px; font-weight: 700; color: #636363; margin-bottom: 14px; }
.community-entry__grid { display: flex; flex-direction: column; gap: 10px; }
.community-entry__card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border-radius: 14px; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.community-entry__card:active { transform: scale(0.98); }
.community-entry__card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.community-entry__card--fb { background: rgba(24,119,242,0.04); border: 1px solid rgba(24,119,242,0.12); }
.community-entry__card--line { background: rgba(6,199,85,0.04); border: 1px solid rgba(6,199,85,0.12); }
.community-entry__card-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.community-entry__card-icon--fb { background: #1877f2; }
.community-entry__card-icon--line { background: #06c755; }
.community-entry__card-number { font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0; }
.community-entry__card-number--fb { color: #1877f2; }
.community-entry__card-number--line { color: #06c755; }
.community-entry__card-desc { font-size: 14px; color: #636363; margin: 2px 0 0; }
.community-entry__card-cta {
  flex-shrink: 0; padding: 7px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 500; color: #fff; white-space: nowrap; margin-left: auto;
}
.community-entry__card-cta--fb { background: #1877f2; }
.community-entry__card-cta--line { background: #06c755; }
@media (min-width:768px) {
  .community-entry__grid { flex-direction: row; gap: 14px; max-width: 800px; }
  .community-entry__card { flex: 1; }
  .community-entry__card-number { font-size: 28px; }
}

/* ══ Category Section ══ */
.cat-section { padding: 32px 16px; }
.cat-section__inner { max-width: 1200px; margin: 0 auto; }
.cat-section__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-left: 12px;
  border-left: 3px solid var(--cat-color, #3db5da);
}
.cat-section__title { font-size: 16px; font-weight: 700; color: #1f2124; margin: 0; }
.cat-section__more { font-size: 14px; color: #3db5da; text-decoration: none; }
.cat-section__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
@media (min-width:768px) { .cat-section__grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width:1024px) { .cat-section__grid { grid-template-columns: repeat(3,1fr); gap: 24px; } }

/* ══ Article Cards ══ */
.article-card--vertical .article-card__link { display: block; text-decoration: none; }
.article-card--vertical .article-card__thumb {
  width: 100%; border-radius: 10px;
  overflow: hidden; margin-bottom: 12px; background: #f9fafb;
}
.article-card--vertical .article-card__thumb img { width: 100%; height: auto; transition: transform 0.3s; }
.article-card--vertical:hover .article-card__thumb img { transform: scale(1.03); }
.article-card__cat {
  display: inline-block; font-size: 12px; font-weight: 500;
  color: #0068a0; background: #e8f6fb; padding: 2px 8px; border-radius: 6px; margin-bottom: 4px;
}
.article-card__title {
  font-size: 14px; font-weight: 500; color: #1f2124; line-height: 1.4; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card__date { font-size: 12px; color: #808285; margin-top: 4px; display: block; }
.mummy-placeholder {
  background: linear-gradient(135deg, #e8f6fb, #fef0ef);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  width: 100%; height: 100%;
}

/* ══ Hot Topics (v2 — card grid) ══ */
.hot-topics { padding: 24px 16px; background: #f9fafb; }
.hot-topics__inner { max-width: 1200px; margin: 0 auto; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-left: 12px;
}
.section-header__title { font-size: 16px; font-weight: 700; }
.section-header__more { font-size: 14px; text-decoration: none; }
.hot-topics__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.ht-card {
  display: block; border-radius: 10px; overflow: hidden;
  background: #fff; border: 1px solid #f1f1f1; text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}
.ht-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-2px); }
.ht-card__top {
  width: 100%;
  background: linear-gradient(135deg, rgba(24,119,242,0.08), rgba(24,119,242,0.03));
  display: flex; align-items: center; justify-content: center;
  padding: 16px; position: relative;
}
.ht-card__quote {
  font-size: 14px; color: #1f2124; line-height: 1.5; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; text-align: center;
}
.ht-card__fb-badge {
  position: absolute; top: 8px; left: 8px;
  width: 22px; height: 22px; border-radius: 50%; background: #1877f2;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700;
}
.ht-card__body { padding: 10px 12px; }
.ht-card__cat {
  display: inline-block; font-size: 12px; font-weight: 500;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(24,119,242,0.08); color: #1877f2; margin-bottom: 4px;
}
.ht-card__stats { display: flex; gap: 10px; font-size: 12px; color: #808285; margin-top: 4px; }
/* Keep old list style as fallback */
.hot-topics__list { display: flex; flex-direction: column; gap: 8px; }
.hot-topics__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: #fff; border-radius: 10px; text-decoration: none;
  border: 1px solid #f1f1f1; transition: box-shadow 0.15s;
}
.hot-topics__item:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.hot-topics__item-label { display: inline-block; font-size: 12px; color: #1877f2; font-weight: 500; margin-bottom: 2px; }
.hot-topics__item-text { font-size: 14px; color: #1f2124; margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hot-topics__item-stats { flex-shrink: 0; display: flex; gap: 12px; font-size: 12px; color: #808285; white-space: nowrap; }
@media (min-width:768px) { .hot-topics__grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width:1024px) {
  .hot-topics__grid { grid-template-columns: repeat(4,1fr); gap: 20px; }
  .hot-topics__list { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
}

/* ══ Bottom Nav ══ */
.bottom-nav {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff; height: 56px; box-shadow: 0 -1px 8px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; text-decoration: none;
  color: #808285; font-size: 12px; font-weight: 500;
  -webkit-tap-highlight-color: transparent; transition: color 0.15s;
}
.bottom-nav__item--active { color: #3db5da; }
.bottom-nav__icon { width: 20px; height: 20px; }
.mummy-page { padding-bottom: 64px; }
@media (min-width:1024px) {
  .bottom-nav { display: none; }
  .mummy-page { padding-bottom: 0; }
}

/* ══ Desktop Sidebar ══ */
@media (min-width:1024px) {
  .mummy-main-layout {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 320px;
    gap: 32px; padding: 0 16px;
  }
  .mummy-sidebar { padding-top: 24px; }
  .mummy-sidebar__section {
    margin-bottom: 24px; padding: 16px;
    background: #f9fafb; border-radius: 10px;
  }
  .mummy-sidebar__title {
    font-size: 14px; font-weight: 700; margin-bottom: 12px;
    padding-bottom: 8px; border-bottom: 2px solid #3db5da; display: inline-block;
  }
  .mummy-sidebar__link {
    display: block; padding: 6px 0; font-size: 14px;
    color: #1f2124; text-decoration: none; line-height: 1.5;
    border-bottom: 1px solid #f1f1f1;
  }
  .mummy-sidebar__link:hover { color: #3db5da; }
}
@media (max-width:1023px) { .mummy-sidebar { display: none; } }

/* ══ Tools Page (v2 — multi-column) ══ */
.tools-page { max-width: 1200px; margin: 0 auto; padding: 24px 16px; width: 100%; }
.tools-page__inner { max-width: 100%; }
.tools-page__section { margin-bottom: 32px; }
.tools-page__section-title {
  font-size: 16px; font-weight: 700; color: #636363;
  padding-left: 12px; border-left: 3px solid var(--cat-color, #3db5da);
  border-radius: 0; margin-bottom: 16px;
}
.tools-page__list { display: flex; flex-direction: column; gap: 12px; }
.tools-page__card {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 10px;
  text-decoration: none; transition: box-shadow 0.15s, transform 0.15s;
}
.tools-page__card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-1px); }
.tools-page__card-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.tools-page__card-title { font-size: 15px; font-weight: 500; color: #1f2124; margin: 0; }
.tools-page__card-desc { font-size: 14px; color: #636363; margin: 4px 0 0; }
.tools-page__card-arrow { margin-left: auto; font-size: 20px; color: #808285; flex-shrink: 0; }
@media (min-width:768px) {
  .tools-page__list { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
  .tools-page__card { padding: 20px; }
  .tools-page__card-icon { width: 56px; height: 56px; }
}
@media (min-width:1024px) { .tools-page__list { grid-template-columns: repeat(3,1fr); gap: 20px; } }

/* ══ Community Page (v2) ══ */
.community-page { max-width: 1200px; margin: 0 auto; padding: 24px 16px; width: 100%; }
.fb-groups-section { margin-bottom: 40px; }
.fb-groups-section__header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.fb-groups-section__icon {
  width: 28px; height: 28px; border-radius: 50%; background: #1877f2;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700;
}
.fb-groups-section__title { font-size: 18px; font-weight: 700; }
.fb-groups-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.fb-group-card {
  padding: 16px; border: 1px solid rgba(24,119,242,0.12); border-radius: 10px;
  text-decoration: none; transition: box-shadow 0.15s, transform 0.15s;
}
.fb-group-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-1px); }
.fb-group-card--featured { border: 2px solid #1877f2; background: rgba(24,119,242,0.03); }
.fb-group-card__featured-badge { display: inline-block; font-size: 12px; color: #1877f2; font-weight: 500; margin-bottom: 4px; }
.fb-group-card__name { font-size: 15px; font-weight: 700; color: #1f2124; margin: 0; }
.fb-group-card__desc { font-size: 14px; color: #636363; margin: 4px 0 8px; }
.fb-group-card__footer { display: flex; align-items: center; justify-content: space-between; }
.fb-group-card__members { font-size: 12px; color: #808285; }
.fb-group-card__join { font-size: 14px; color: #1877f2; font-weight: 500; }
@media (min-width:768px) { .fb-groups-grid { grid-template-columns: repeat(3,1fr); gap: 16px; } }
@media (min-width:1024px) { .fb-group-card { padding: 20px; } }

.line-section { padding-top: 24px; border-top: 1px solid #e6e6e6; }
.line-section__header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.line-section__icon {
  width: 28px; height: 28px; border-radius: 50%; background: #06c755;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700;
}
.line-section__title { font-size: 18px; font-weight: 700; }
.line-section__desc { font-size: 14px; color: #636363; margin-bottom: 16px; }
.line-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.line-card {
  padding: 14px; border: 1px solid rgba(6,199,85,0.12); border-radius: 8px;
  text-decoration: none; background: rgba(6,199,85,0.02); transition: box-shadow 0.15s;
}
.line-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.line-card__name { font-size: 14px; font-weight: 500; color: #1f2124; }
.line-card__sub { font-size: 12px; color: #636363; margin-top: 2px; }
.line-card__join { font-size: 12px; color: #06c755; font-weight: 500; margin-top: 6px; display: block; }
@media (min-width:768px) { .line-grid { grid-template-columns: repeat(3,1fr); gap: 12px; } }
@media (min-width:1024px) { .line-grid { grid-template-columns: repeat(4,1fr); } .line-card { padding: 16px; } }

/* Keep old LINE communities CSS as fallback */
.line-communities { padding: 32px 16px; }
.line-communities__title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.line-communities__desc { font-size: 14px; color: #636363; margin: 0 0 24px; }
.line-communities__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.line-communities__card {
  display: flex; flex-direction: column; padding: 16px;
  background: rgba(6,199,85,0.04); border: 1px solid rgba(6,199,85,0.12);
  border-radius: 10px; text-decoration: none; transition: box-shadow 0.15s, transform 0.15s;
}
.line-communities__card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-1px); }
.line-communities__card-name { font-size: 15px; font-weight: 700; color: #1f2124; }
.line-communities__card-count { font-size: 14px; color: #636363; margin-top: 4px; }
.line-communities__card-join { font-size: 14px; color: #06c755; font-weight: 500; margin-top: 8px; }
@media (min-width:768px) { .line-communities__grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width:1024px) { .line-communities__grid { grid-template-columns: repeat(4,1fr); } }

/* Override Gutenberg/WP default narrow width */
.page-template-page-tools-php .entry-content > *,
.page-template-page-community-php .entry-content > *,
.page-template-page-home-php .entry-content > * { max-width: 100%; }

/* ══ 文章卡片封面圖 — 最終版 ══ */
.a-card__thumb,
.article-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #f9fafb;
}

.a-card__thumb img,
.article-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

