:root {
  --blog-border: #e7e7ea;
  --blog-muted: #6f7078;
  --blog-surface: #f7f7f8;
}

.blog-page { background: #fff; }
.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 16%, rgba(143,14,20,.07), transparent 28%),
    radial-gradient(circle at 15% 82%, rgba(143,14,20,.035), transparent 30%),
    linear-gradient(180deg,#fff 0%,#fafafa 100%);
}
.blog-hero::before {
  position: absolute;
  right: max(4vw, 36px);
  top: 36px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(143,14,20,.08);
  border-radius: 50%;
  box-shadow: inset 0 0 0 42px rgba(143,14,20,.018), inset 0 0 0 82px rgba(143,14,20,.018);
  content: "";
}
.blog-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 52px; }
.blog-hero-copy { max-width: 790px; }
.blog-hero h1 { margin-top: 14px; font-size: clamp(2.75rem, 5.8vw, 5.3rem); line-height: .99; letter-spacing: -.055em; }
.blog-hero h1 span { color: var(--red); }
.blog-hero p { max-width: 680px; margin-top: 20px; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.blog-hero-stat { min-width: 220px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.86); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.blog-hero-stat .icon-box { margin-bottom: 15px; }
.blog-hero-stat b { display: block; font-family: var(--font-heading); font-size: 1.05rem; }
.blog-hero-stat span:last-child { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; }

.blog-toolbar { position: sticky; top: 112px; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.blog-toolbar-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.blog-search { position: relative; flex: 1; max-width: 650px; }
.blog-search .icon { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; color: #8a8b92; transform: translateY(-50%); }
.blog-search input { width: 100%; height: 52px; padding: 0 52px 0 48px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); outline: none; }
.blog-search input:focus { border-color: rgba(143,14,20,.42); box-shadow: 0 0 0 4px rgba(143,14,20,.07); }
.blog-search button { position: absolute; right: 7px; top: 7px; width: 38px; height: 38px; border: 0; border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 1.25rem; }
.blog-result-count { flex: none; color: var(--muted); font-size: .84rem; font-weight: 700; }

.blog-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 44px; padding: 58px 0 92px; align-items: start; }
.blog-content { min-width: 0; }
.blog-featured { margin-bottom: 26px; }
.blog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.blog-card { overflow: hidden; border: 1px solid var(--blog-border); border-radius: 22px; background: #fff; box-shadow: 0 10px 34px rgba(22,22,27,.045); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.blog-card:hover { border-color: #dddde1; box-shadow: 0 18px 45px rgba(22,22,27,.08); transform: translateY(-3px); }
.blog-card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16/10; background: var(--surface); }
.blog-card-media::after { position: absolute; inset: 0; background: linear-gradient(180deg,transparent 60%,rgba(18,18,22,.10)); content: ""; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.blog-card:hover .blog-card-media img { transform: scale(1.035); }
.blog-card-body { padding: 22px; }
.blog-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .73rem; font-weight: 700; }
.blog-category { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.blog-category.is-red { color: #a0161c; background: #fff0f1; }
.blog-category.is-blue { color: #205c8c; background: #edf6fc; }
.blog-category.is-green { color: #21704c; background: #edf8f2; }
.blog-category.is-amber { color: #8a5b10; background: #fff7e8; }
.blog-category.is-purple { color: #67448d; background: #f5effb; }
.blog-card h2, .blog-card h3 { margin-top: 17px; font-size: 1.28rem; line-height: 1.25; letter-spacing: -.025em; }
.blog-card h2 a, .blog-card h3 a { color: var(--ink); }
.blog-card p { margin-top: 12px; color: var(--muted); font-size: .88rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-read-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--ink); font-size: .82rem; font-weight: 800; }
.blog-read-link span { color: var(--red); transition: transform .2s ease; }
.blog-read-link:hover span { transform: translateX(3px); }
.blog-card-featured { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 410px; }
.blog-card-featured .blog-card-media { height: 100%; aspect-ratio: auto; }
.blog-card-featured .blog-card-body { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.blog-card-featured h2 { font-size: clamp(1.75rem,3vw,2.55rem); }
.blog-card-featured p { -webkit-line-clamp: 4; font-size: .96rem; }

.blog-sidebar { display: grid; gap: 20px; position: sticky; top: 184px; }
.blog-widget { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.blog-widget.soft { background: var(--surface); }
.blog-widget h2 { font-size: 1.05rem; }
.blog-widget > p { margin-top: 9px; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.blog-newsletter-form { display: grid; gap: 10px; margin-top: 18px; }
.blog-newsletter-form input { width: 100%; height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none; }
.blog-newsletter-form input:focus { border-color: rgba(143,14,20,.42); box-shadow: 0 0 0 4px rgba(143,14,20,.07); }
.blog-newsletter-form button { min-height: 46px; border: 0; border-radius: 12px; color: #fff; background: var(--red); font-weight: 800; }
.blog-newsletter-form button:disabled { opacity: .62; cursor: wait; }
.newsletter-status { min-height: 18px; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.newsletter-status.success { color: #21704c; }
.newsletter-status.error { color: #a0161c; }
.trending-list { display: grid; gap: 2px; margin-top: 15px; }
.trending-item { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; padding: 13px 0; border-top: 1px solid var(--line); }
.trending-item:first-child { border-top: 0; }
.trending-item > span:first-child { color: #c5c5ca; font-family: var(--font-heading); font-size: .86rem; font-weight: 700; }
.trending-item b { display: -webkit-box; color: var(--ink); font-size: .82rem; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trending-item small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; }
.blog-categories { display: grid; gap: 4px; margin-top: 14px; }
.blog-categories button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; text-align: left; font-weight: 700; }
.blog-categories button:hover, .blog-categories button.active { color: var(--ink); background: var(--surface); }
.blog-categories button.active span { color: var(--red); }
.blog-categories b { min-width: 28px; padding: 3px 7px; border-radius: 999px; background: #fff; color: #8a8b92; font-size: .68rem; text-align: center; }
.blog-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.blog-pagination button { min-width: 42px; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-weight: 800; }
.blog-pagination button:hover:not(:disabled), .blog-pagination button.active { border-color: var(--red); color: #fff; background: var(--red); }
.blog-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.blog-loading, .blog-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 250px; padding: 34px; border: 1px dashed #d9d9dd; border-radius: 20px; color: var(--muted); background: #fafafa; text-align: center; }
.blog-empty h2 { margin-top: 14px; font-size: 1.35rem; color: var(--ink); }
.blog-empty p { margin-top: 7px; }
.blog-error { display: grid; gap: 5px; text-align: center; }
.blog-error b { color: var(--ink); }

/* Article */
.article-page { background: #fff; }
.article-main { padding: 62px 0 100px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 820px) 310px; gap: 48px; justify-content: center; align-items: start; }
.article-shell { min-width: 0; }
.article-heading { max-width: 780px; margin-bottom: 30px; }
.article-heading h1 { margin-top: 16px; font-size: clamp(2.4rem,5vw,4.6rem); line-height: 1.02; letter-spacing: -.052em; }
.article-meta { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.article-meta i { width: 4px; height: 4px; border-radius: 50%; background: #c7c7cc; }
.article-hero-image { display: block; width: 100%; max-height: 540px; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-sm); }
.article-content { max-width: 760px; margin: 38px auto 0; color: #36363d; font-size: 1.02rem; line-height: 1.82; }
.article-content > * + * { margin-top: 1.25em; }
.article-content h2 { margin-top: 1.8em; font-size: 1.9rem; color: var(--ink); }
.article-content h3 { margin-top: 1.6em; font-size: 1.4rem; color: var(--ink); }
.article-content ul, .article-content ol { padding-left: 1.3em; }
.article-content li + li { margin-top: .55em; }
.article-content blockquote { padding: 20px 22px; border-left: 4px solid var(--red); border-radius: 0 14px 14px 0; background: var(--surface); color: var(--ink); font-weight: 600; }
.article-content a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article-content img { max-width: 100%; height: auto; border-radius: 18px; }
.article-side { position: sticky; top: 110px; display: grid; gap: 18px; }
.article-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.article-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 800; }
.article-action .icon { width: 18px; height: 18px; }
.article-action:hover, .article-action.liked { border-color: rgba(143,14,20,.35); color: var(--red); background: var(--red-soft); }
.article-state { padding: 80px 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); text-align: center; }
.article-state p { margin: 12px auto 24px; color: var(--muted); }

/* Popup */
.newsletter-popup { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: 18px; background: rgba(18,18,22,.48); opacity: 0; visibility: hidden; transition: .22s ease; }
.newsletter-popup.show { opacity: 1; visibility: visible; }
.newsletter-modal { position: relative; width: min(760px, 100%); display: grid; grid-template-columns: .88fr 1.12fr; overflow: hidden; border-radius: 26px; background: #fff; box-shadow: 0 30px 110px rgba(0,0,0,.25); transform: translateY(14px) scale(.985); transition: .22s ease; }
.newsletter-popup.show .newsletter-modal { transform: translateY(0) scale(1); }
.newsletter-visual { position: relative; min-height: 390px; background: var(--surface); }
.newsletter-visual img { width: 100%; height: 100%; object-fit: cover; }
.newsletter-visual::after { position: absolute; inset: 0; background: linear-gradient(180deg,transparent 45%,rgba(20,20,24,.34)); content: ""; }
.newsletter-copy { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.newsletter-copy h2 { margin-top: 13px; font-size: clamp(1.75rem,3vw,2.55rem); }
.newsletter-copy > p { margin-top: 13px; color: var(--muted); }
.newsletter-close { position: absolute; right: 15px; top: 15px; z-index: 2; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.92); font-size: 1.4rem; }
.newsletter-fineprint { margin-top: 11px; color: #92939a; font-size: .68rem; }
body.newsletter-open { overflow: hidden; }

@media (max-width: 1050px) {
  .blog-layout { grid-template-columns: minmax(0,1fr) 290px; gap: 28px; }
  .article-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 32px; }
}

@media (max-width: 900px) {
  .blog-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .blog-hero-stat { width: min(100%, 360px); }
  .blog-layout, .article-layout { grid-template-columns: 1fr; }
  .blog-sidebar, .article-side { position: static; }
  .blog-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .blog-widget:first-child { grid-column: 1 / -1; }
  .article-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .blog-hero { padding: 50px 0 44px; }
  .blog-hero::before { right: -90px; top: -10px; }
  .blog-hero h1 { font-size: clamp(2.6rem,13vw,4rem); }
  .blog-hero-stat { display: none; }
  .blog-toolbar { top: 68px; }
  .blog-toolbar-inner { min-height: 72px; }
  .blog-result-count { display: none; }
  .blog-layout { padding: 36px 0 76px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-featured { grid-template-columns: 1fr; min-height: 0; }
  .blog-card-featured .blog-card-media { aspect-ratio: 16/10; }
  .blog-card-featured .blog-card-body { padding: 24px; }
  .blog-sidebar { grid-template-columns: 1fr; }
  .blog-widget:first-child { grid-column: auto; }
  .article-main { padding: 42px 0 78px; }
  .article-heading h1 { font-size: clamp(2.35rem,11.5vw,3.5rem); }
  .article-meta { flex-wrap: wrap; }
  .article-content { font-size: .98rem; line-height: 1.75; }
  .article-side { grid-template-columns: 1fr; }
  .newsletter-modal { grid-template-columns: 1fr; }
  .newsletter-visual { display: none; }
  .newsletter-copy { padding: 34px 24px 28px; }
}
