/* Myao — base shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f5ede0;
  --surface:    #ffffff;
  --rose:       #f2c4b0;
  --rose-light: #faf0e9;
  --rose-mid:   #f0d5c8;
  --teal:       #5bbcb8;
  --teal-dark:  #3fa09c;
  --teal-light: #e8f6f5;
  --text:       #2d2d2d;
  --muted:      #7a7a7a;
  --border:     #e8ddd4;
  --serif:      'Playfair Display', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* TOPBAR */
.topbar { background: var(--rose); color: var(--text); font-size: 0.82rem; font-weight: 500; text-align: center; padding: 9px 16px; }
.topbar a { text-decoration: underline; font-weight: 600; }

/* HEADER */
header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.header-nav { display: flex; gap: 2px; }
.header-nav a, .header-actions a { font-size: 0.88rem; font-weight: 500; color: var(--muted); padding: 7px 13px; border-radius: 20px; transition: all 0.18s; }
.header-nav a:hover, .header-actions a:hover { color: var(--text); background: var(--bg); }
.header-nav a.active, .header-actions a.active { color: var(--teal); }
.logo { text-align: center; font-family: var(--serif); font-size: 2.2rem; font-weight: 700; letter-spacing: 3px; color: var(--text); text-transform: uppercase; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 22px; border-radius: 24px; font-family: var(--sans); font-size: 0.88rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; letter-spacing: 0.2px; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); }
.btn-outline-teal { background: transparent; border: 1.5px solid var(--teal); color: var(--teal); }
.btn-outline-teal:hover { background: var(--teal); color: white; }

/* BREADCRUMB */
.breadcrumb { background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 32px; font-size: 0.8rem; color: var(--muted); }
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--muted); transition: color 0.18s; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb span { color: var(--border); }

/* PAGE HERO */
.page-hero { padding: 64px 32px 52px; text-align: center; }
.page-hero-eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.page-hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 14px; line-height: 1.2; }
.page-hero p { color: var(--muted); font-size: 1rem; max-width: 560px; margin: 0 auto 28px; line-height: 1.7; }

/* FILTER BAR */
.filter-bar { background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
.filter-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; gap: 4px; }
.filter-pill { display: flex; align-items: center; gap: 6px; padding: 14px 16px; font-size: 0.87rem; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; cursor: pointer; transition: all 0.18s; background: none; border-top: none; border-left: none; border-right: none; font-family: var(--sans); }
.filter-pill:hover { color: var(--text); border-bottom-color: var(--rose); }
.filter-pill.active { color: var(--text); border-bottom-color: var(--teal); font-weight: 600; }

/* LAYOUT */
.page-layout { max-width: 1200px; margin: 0 auto; padding: 56px 32px 96px; display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }

/* ARTICLE ROWS */
.art-badge { display: inline-flex; align-items: center; background: var(--rose); color: var(--text); font-size: 0.7rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; width: fit-content; }
.art-meta { font-size: 0.78rem; color: var(--muted); }
.art-link { font-size: 0.86rem; font-weight: 600; color: var(--teal); }

.art-featured { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); margin-bottom: 36px; cursor: pointer; transition: transform 0.25s, box-shadow 0.25s; }
.art-featured:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(45,45,45,0.1); }
.art-featured-img { background: var(--rose-mid); display: flex; align-items: center; justify-content: center; font-size: 8rem; min-height: 280px; }
.art-featured-body { padding: 36px 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.art-featured-body h2 { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1.25; }
.art-featured-body p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

.list-divider { font-size: 0.74rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--border); }

.art-row { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: opacity 0.18s; }
.art-row:hover { opacity: 0.72; }
.art-row-img { aspect-ratio: 1; background: var(--bg); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; flex-shrink: 0; }
.art-row-body { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.art-row-body h3 { font-family: var(--serif); font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.art-row-body p { font-size: 0.86rem; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-row-footer { display: flex; align-items: center; gap: 14px; margin-top: 2px; }

.load-more { text-align: center; padding-top: 40px; }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.sidebar-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sidebar-box-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--border); }
.sidebar-box-head h3 { font-family: var(--serif); font-size: 1rem; font-weight: 700; }
.sidebar-box-body { padding: 16px 20px; }

.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-list-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; font-size: 0.88rem; }
.cat-list-item:hover { background: var(--bg); }
.cat-list-item span.count { font-size: 0.74rem; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 10px; }

.popular-list { display: flex; flex-direction: column; }
.popular-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: opacity 0.18s; align-items: flex-start; }
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-item:hover { opacity: 0.7; }
.popular-num { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--rose); min-width: 22px; line-height: 1; padding-top: 2px; }
.popular-title { font-size: 0.86rem; font-weight: 500; line-height: 1.4; }
.popular-cat { font-size: 0.73rem; color: var(--muted); margin-top: 3px; }

.sidebar-nl { background: var(--rose-light); border: 1px solid var(--border); border-radius: 12px; padding: 24px 20px; text-align: center; }
.sidebar-nl-icon { font-size: 1.8rem; margin-bottom: 10px; }
.sidebar-nl h3 { font-family: var(--serif); font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.sidebar-nl p { font-size: 0.83rem; color: var(--muted); margin-bottom: 16px; line-height: 1.6; }
.sidebar-nl input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px 13px; font-family: var(--sans); font-size: 0.86rem; outline: none; margin-bottom: 8px; transition: border-color 0.18s; }
.sidebar-nl input:focus { border-color: var(--teal); }
.sidebar-nl button { width: 100%; background: var(--teal); color: white; border: none; border-radius: 8px; padding: 10px; font-family: var(--sans); font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.sidebar-nl button:hover { background: var(--teal-dark); }

/* FOOTER */
footer { background: #1e1e1e; color: #888; padding: 64px 32px 28px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid #2e2e2e; }
.footer-brand .logo-footer { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; letter-spacing: 3px; color: #fff; text-transform: uppercase; display: block; margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; }
.footer-col h4 { color: #ccc; font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { color: #888; font-size: 0.88rem; transition: color 0.18s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 22px auto 0; display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; flex-wrap: wrap; gap: 12px; }
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #fff; }
.footer-links { display: flex; gap: 18px; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .art-featured { grid-template-columns: 1fr; }
  .art-featured-img { min-height: 200px; font-size: 5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-nav { display: none; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 24px 36px; }
  .page-layout { padding: 36px 20px 64px; }
}
