/* ============================================================
   Lifestyle Theme — Clean Modern Editorial
   White + Sky Blue, Syne display + DM Sans body
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Variables ── */
[data-theme="lifestyle"] {
  --color-primary:     #4CC9F0;
  --color-primary-dk:  #1AA8D4;
  --color-primary-lt:  #F4FBFE;
  --color-bg:          #FFFFFF;
  --color-bg-alt:      #F4FBFE;
  --color-text:        #1A1A1A;
  --color-muted:       #888888;
  --color-border:      #E8E8E8;
  --font-display:      'Syne', system-ui, sans-serif;
  --font-ui:           'DM Sans', system-ui, sans-serif;
  --radius:            8px;
  --shadow-card:       0 2px 12px rgba(76,201,240,0.08);
  --shadow-hover:      0 8px 24px rgba(76,201,240,0.14);
  --transition:        0.28s ease;
}

/* ── Bridge variables（共用模板相容） ── */
[data-theme="lifestyle"] {
  --color-surface:         #FFFFFF;
  --color-surface-alt:     #F4FBFE;
  --color-primary-dark:    #1A1A1A;
  --color-primary-light:   #7EDCF5;
  --color-accent:          #4CC9F0;
  --color-accent-light:    #F4FBFE;
  --color-text-primary:    #1A1A1A;
  --color-text-secondary:  #555555;
  --color-text-muted:      #888888;
  --color-text-on-dark:    #FFFFFF;
  --font-heading:          'Syne', system-ui, sans-serif;
  --font-body:             'DM Sans', system-ui, sans-serif;
  --radius-sm:             4px;
  --radius-md:             8px;
  --radius-lg:             12px;
  --header-bg:             #FFFFFF;
  --header-text:           #1A1A1A;
  --footer-bg:             #FFFFFF;
  --footer-text:           #888888;
  --card-shadow:           0 2px 12px rgba(76,201,240,0.08);
  --card-shadow-hover:     0 8px 24px rgba(76,201,240,0.14);
  --reading-progress-color: #4CC9F0;
}

/* ── Header ── */
[data-theme="lifestyle"] .site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  border-bottom: 2px solid var(--color-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition);
}

[data-theme="lifestyle"] .site-header.scrolled {
  box-shadow: 0 2px 20px rgba(76,201,240,0.1);
}

[data-theme="lifestyle"] .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

[data-theme="lifestyle"] .header-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

[data-theme="lifestyle"] .header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

[data-theme="lifestyle"] .header-nav a {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--transition);
}

[data-theme="lifestyle"] .header-nav a:hover,
[data-theme="lifestyle"] .header-nav a.active {
  color: var(--color-primary);
}

/* 手機漢堡 */
[data-theme="lifestyle"] .header-burger {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  width: 22px;
}

[data-theme="lifestyle"] .header-burger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile menu overlay */
[data-theme="lifestyle"] .mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  animation: lsFadeIn 0.2s ease;
}

[data-theme="lifestyle"] .mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

[data-theme="lifestyle"] .mobile-menu a:hover {
  color: var(--color-primary);
}

[data-theme="lifestyle"] .mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  cursor: pointer;
}

@keyframes lsFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Hero 無圖 ── */
[data-theme="lifestyle"] .hero-no-image {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
  background: var(--color-bg);
}

/* 右側圓圈裝飾 */
[data-theme="lifestyle"] .hero-no-image::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1.5px solid rgba(76,201,240,0.14);
  top: -80px;
  right: -80px;
  pointer-events: none;
}

[data-theme="lifestyle"] .hero-no-image::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(76,201,240,0.09);
  top: 30px;
  right: 40px;
  pointer-events: none;
}

[data-theme="lifestyle"] .hero-circle-deco {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(76,201,240,0.07);
  top: 60%;
  right: 12%;
  pointer-events: none;
}

[data-theme="lifestyle"] .hero-text-center {
  position: relative;
  z-index: 1;
  padding: 0 2rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* 逐字淡入 animation */
@keyframes lsCharIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-theme="lifestyle"] .hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1rem;
  animation: lsCharIn 0.5s ease 0.05s both;
}

[data-theme="lifestyle"] .hero-no-image h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  animation: lsCharIn 0.5s ease 0.15s both;
}

[data-theme="lifestyle"] .hero-underline {
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  margin-bottom: 1.25rem;
  animation: lsCharIn 0.5s ease 0.25s both;
}

[data-theme="lifestyle"] .hero-stat {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  animation: lsCharIn 0.5s ease 0.35s both;
}

/* ── Hero 有封面圖 ── */
[data-theme="lifestyle"] .hero-with-image {
  position: relative;
  height: 85vh;
  min-height: 520px;
  overflow: hidden;
}

[data-theme="lifestyle"] .hero-with-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-theme="lifestyle"] .hero-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26,26,26,0.75) 0%,
    rgba(26,26,26,0.2) 50%,
    transparent 100%
  );
}

[data-theme="lifestyle"] .hero-img-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 3rem;
}

[data-theme="lifestyle"] .hero-img-content .hero-eyebrow {
  color: rgba(76,201,240,0.9);
}

[data-theme="lifestyle"] .hero-img-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

[data-theme="lifestyle"] .hero-img-content .hero-stat {
  color: rgba(255,255,255,0.6);
}

/* ── 卡片 ── */
[data-theme="lifestyle"] .article-card {
  display: block;
  text-decoration: none;
  background: var(--color-bg);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

[data-theme="lifestyle"] .article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* 頂部 3px 天藍色條 */
[data-theme="lifestyle"] .article-card::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--color-primary);
  width: 100%;
}

[data-theme="lifestyle"] .card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
}

[data-theme="lifestyle"] .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

[data-theme="lifestyle"] .article-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

/* 分類 pill */
[data-theme="lifestyle"] .card-category-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
}

/* 無封面圖佔位 */
[data-theme="lifestyle"] .card-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

[data-theme="lifestyle"] .card-img-placeholder::before {
  content: '';
  width: 28px;
  height: 28px;
  border: 2px solid rgba(76,201,240,0.35);
  transform: rotate(45deg);
}

[data-theme="lifestyle"] .card-img-placeholder::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(76,201,240,0.2);
  transform: rotate(45deg);
}

[data-theme="lifestyle"] .card-body {
  padding: 0.9rem 1rem;
}

[data-theme="lifestyle"] .card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

[data-theme="lifestyle"] .card-excerpt {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.65;
}

[data-theme="lifestyle"] .card-date {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--color-primary);
  margin-top: 0.75rem;
  letter-spacing: 0.06em;
}

/* Magazine 第一篇全寬 */
[data-theme="lifestyle"] .articles-grid.magazine .article-card:first-child {
  grid-column: 1 / -1;
}

[data-theme="lifestyle"] .articles-grid.magazine .article-card:first-child .card-img-wrap {
  aspect-ratio: 16 / 7;
}

[data-theme="lifestyle"] .articles-grid.magazine .article-card:first-child .card-title {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

/* ── Scroll reveal ── */
@keyframes lsFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-theme="lifestyle"] .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-theme="lifestyle"] .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Section 標題 ── */
[data-theme="lifestyle"] .section-eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

[data-theme="lifestyle"] .section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

[data-theme="lifestyle"] .section-rule {
  width: 32px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  margin: 0.75rem 0 2.5rem;
}

/* ── Stats bar ── */
[data-theme="lifestyle"] .stats-bar {
  background: var(--color-bg-alt);
  border-top: 3px solid var(--color-primary);
  padding: 3rem 2rem;
}

[data-theme="lifestyle"] .stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1;
}

[data-theme="lifestyle"] .stat-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.4rem;
}

/* ── Footer ── */
[data-theme="lifestyle"] .site-footer {
  background: var(--color-bg);
  border-top: 3px solid var(--color-primary);
  padding: 3.5rem 2rem 2.5rem;
}

[data-theme="lifestyle"] .footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-block;
}

[data-theme="lifestyle"] .footer-rule {
  display: none;
}

[data-theme="lifestyle"] .footer-nav a {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bbb;
  text-decoration: none;
  transition: color var(--transition);
}

[data-theme="lifestyle"] .footer-nav a:hover {
  color: var(--color-primary);
}

[data-theme="lifestyle"] .footer-copy {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  color: #ccc;
}

/* ── 文章頁 ── */
[data-theme="lifestyle"] .article-hero-no-img {
  height: 260px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

[data-theme="lifestyle"] .article-hero-no-img::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(76,201,240,0.12);
  top: -100px;
  right: -80px;
}

[data-theme="lifestyle"] .article-hero-with-img {
  height: 460px;
  position: relative;
  overflow: hidden;
}

[data-theme="lifestyle"] .article-hero-with-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-theme="lifestyle"] .article-hero-with-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.6) 0%, transparent 50%);
}

[data-theme="lifestyle"] .article-body {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--color-text);
}

[data-theme="lifestyle"] .article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

[data-theme="lifestyle"] .article-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* ── Reading progress ── */
[data-theme="lifestyle"] .reading-progress-bar {
  background: var(--color-primary);
  height: 3px;
}

/* ── Breadcrumb ── */
[data-theme="lifestyle"] .breadcrumb,
[data-theme="lifestyle"] .breadcrumb a {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-decoration: none;
}

[data-theme="lifestyle"] .breadcrumb a:hover {
  color: var(--color-primary);
}

/* ── Category Cards ── */
[data-theme="lifestyle"] .cat-card {
  background: var(--color-bg) !important;
  border-color: var(--color-border) !important;
}

[data-theme="lifestyle"] .cat-card:hover {
  background: var(--color-primary-dark) !important;
  border-color: var(--color-primary-dark) !important;
}

[data-theme="lifestyle"] .cat-card:hover .cat-card-number {
  color: rgba(76,201,240,0.45) !important;
}

[data-theme="lifestyle"] .cat-card:hover .cat-card-name {
  color: #FFFFFF !important;
}

[data-theme="lifestyle"] .cat-card:hover .cat-card-count {
  color: rgba(255,255,255,0.55) !important;
}

[data-theme="lifestyle"] .cat-card:hover .cat-card-arrow {
  color: var(--color-primary) !important;
}

[data-theme="lifestyle"] .cat-card .cat-card-number {
  color: var(--color-primary) !important;
}

[data-theme="lifestyle"] .cat-card .cat-card-name {
  color: var(--color-text) !important;
}

[data-theme="lifestyle"] .cat-card .cat-card-count {
  color: var(--color-muted) !important;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  [data-theme="lifestyle"] .header-nav { display: none; }
  [data-theme="lifestyle"] .header-burger { display: flex; }
  [data-theme="lifestyle"] .hero-no-image { min-height: 55vh; }
  [data-theme="lifestyle"] .hero-with-image { height: 60vh; min-height: 380px; }
  [data-theme="lifestyle"] .hero-img-content { padding: 2rem; }

  /* P1 rule: prevent orb/glow overflow */
  html, body { overflow-x: hidden; }
}

@media (max-width: 480px) {
  [data-theme="lifestyle"] .header-logo { font-size: 1rem; }
  [data-theme="lifestyle"] .hero-no-image h1 { font-size: 2.4rem; }
}
