/* ============================================================
   blog.css — blog listing page only (blog.html)
   Depends on assets/css/base.css.
   ============================================================ */

/* ───── Header / title ───── */
.blog-head{ padding: 80px 0 40px; }
.crumb{
  display: inline-flex; gap: 6px; align-items: center;
  color: var(--ink-3); font-size: 13px; font-weight: 600;
  margin-bottom: 24px;
}
.crumb a:hover{ color: var(--ink); }
.blog-head h1{
  margin: 0 0 14px;
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 900; letter-spacing: -0.04em;
  line-height: 1.05;
  text-wrap: balance;
}
.blog-head h1 .pink{ color: var(--pink); }
.blog-head .lead{
  margin: 0;
  font-size: 17px; color: var(--ink-2); font-weight: 500;
  max-width: 580px; line-height: 1.6;
}

/* ───── Search bar ───── */
.search-wrap{ margin-top: 36px; max-width: 580px; }
.search{
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  border: 1.5px solid transparent;
  transition: border-color .15s ease, background .15s ease;
}
.search:focus-within{ background: #fff; border-color: var(--navy);}
.search input{
  flex: 1; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 15px; padding: 12px 0;
  color: var(--ink);
}
.search input::placeholder{ color: var(--ink-3); }
.search button.go{
  height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--navy); color: #fff; border: 0;
  font-weight: 700; font-size: 14px;
}

/* ───── Category tabs (sticky under nav) ───── */
.cats-bar{
  position: sticky; top: var(--nav-height); z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.cats{
  display: flex; gap: 6px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cats::-webkit-scrollbar{ display: none; }
.cat{
  flex-shrink: 0;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700; font-size: 14.5px;
  color: var(--ink-2); background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  font-family: inherit;
}
.cat:hover{ background: var(--bg-soft); }
.cat.on{ background: var(--ink); color: #fff; border-color: var(--ink); }
.cat .cnt{
  margin-left: 6px;
  font-size: 12px; opacity: 0.6; font-weight: 700;
}

/* ───── Featured (hero post) ───── */
.featured{ padding: 48px 0 24px; }
.feature-card{
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  align-items: stretch;
}
.feature-card .thumb{
  aspect-ratio: 4/3;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-soft);
  position: relative;
}
.feature-card .thumb img{ width: 100%; height: 100%; object-fit: cover; }
.feature-card .thumb .tag-top{
  position: absolute; top: 18px; left: 18px;
  background: var(--pink); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  padding: 8px 14px; border-radius: 999px;
  text-transform: uppercase;
}
.feature-card .body{
  display: flex; flex-direction: column; justify-content: center;
  padding: 8px 0;
}
.feature-card .meta{
  display: flex; gap: 12px; align-items: center;
  font-size: 13px; color: var(--ink-3); font-weight: 600;
  margin-bottom: 18px;
}
.feature-card .meta .cat-pill{
  color: var(--navy); font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; font-size: 12px;
}
.feature-card .meta .dot{
  width: 3px; height: 3px; border-radius: 999px; background: var(--ink-3);
}
.feature-card h2{
  margin: 0 0 18px;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 900; letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}
.feature-card p.excerpt{
  margin: 0 0 30px;
  color: var(--ink-2); font-size: 16.5px; line-height: 1.65;
  max-width: 500px;
}
.feature-card .author{ display: flex; align-items: center; gap: 12px; }
.feature-card .author .ava{
  width: 40px; height: 40px; border-radius: 999px;
  background: linear-gradient(135deg, #ffd1e3, #fc7cb4);
  display: grid; place-items: center;
  color: #fff; font-weight: 800;
}
.feature-card .author b{ display: block; font-size: 14px; font-weight: 800; letter-spacing: -0.02em;}
.feature-card .author span{ display: block; font-size: 12px; color: var(--ink-3);}

/* ───── Article grid ───── */
.grid-section{ padding: 56px 0 120px; }
.section-bar{
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 32px;
}
.section-bar h3{
  margin: 0;
  font-size: 26px; font-weight: 900; letter-spacing: -0.03em;
}
.section-bar .sort{
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--bg-soft); border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-3);
}
.section-bar .sort a{
  padding: 7px 16px; border-radius: 999px; color: var(--ink-3);
  transition: background .15s ease, color .15s ease;
}
.section-bar .sort a.on{
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(15,16,32,0.08);
}

.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 28px;
}
.card{
  display: flex; flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform .25s ease;
}
.card:hover{ transform: translateY(-3px);}
.card-body{ display: flex; flex-direction: column; flex: 1; min-width: 0; }
/* Whole card is tappable — the title link is stretched over the card. */
.card-link{ color: inherit; text-decoration: none; }
.card-link::after{ content: ""; position: absolute; inset: 0; z-index: 1; }
.card .thumb{
  aspect-ratio: 4/3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 18px;
  position: relative;
}
.card .thumb img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .thumb img{ transform: scale(1.04);}
.card .cat-pill{
  color: var(--navy); font-weight: 800;
  font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card h4{
  margin: 0 0 12px;
  font-size: 19px; font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.35;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card p.exc{
  margin: 0 0 16px;
  color: var(--ink-2); font-size: 14.5px; line-height: 1.55;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .foot{
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--ink-3); font-weight: 600;
}
.card .foot .dot{
  width: 3px; height: 3px; border-radius: 999px; background: var(--ink-3);
}

/* ───── Load more ───── */
.more{ display: flex; justify-content: center; margin-top: 64px; }
.more button{
  height: 56px; padding: 0 36px;
  border-radius: 999px;
  background: #fff; color: var(--ink);
  border: 1.5px solid var(--ink);
  font-weight: 800; font-size: 15px;
  font-family: inherit;
}
.more button:hover{ background: var(--ink); color: #fff;}

/* ───── Newsletter ───── */
.newsletter{
  background: var(--navy); color: #fff;
  border-radius: 32px;
  padding: 72px 56px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  align-items: center;
  margin-bottom: 80px;
  position: relative; overflow: hidden;
}
.newsletter::after{
  content: ""; position: absolute;
  width: 320px; height: 320px; border-radius: 999px;
  background: var(--pink); opacity: 0.18;
  right: -100px; top: -120px;
}
.newsletter h3{
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900; letter-spacing: -0.035em;
  line-height: 1.15;
  position: relative; z-index: 2;
}
.newsletter h3 .pink{ color: var(--pink); }
.newsletter p{
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 16px; line-height: 1.6;
  position: relative; z-index: 2;
  max-width: 460px;
}
.newsletter form{
  display: flex; gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 6px;
  position: relative; z-index: 2;
}
.newsletter input{
  flex: 1;
  border: 0; outline: 0; background: transparent;
  font: inherit; padding: 12px 18px;
  font-size: 15px; color: var(--ink);
  min-width: 0;
}
.newsletter button{
  height: 48px; padding: 0 24px;
  background: var(--ink); color: #fff;
  border-radius: 999px; border: 0;
  font-weight: 800; font-size: 14px;
  white-space: nowrap;
  font-family: inherit;
}

/* ───── Responsive ───── */
@media (max-width: 1024px){
  .feature-card{ grid-template-columns: 1fr; gap: 24px;}
  .feature-card .thumb{ aspect-ratio: 16/10; border-radius: 24px;}
  .feature-card .body{ padding: 4px 8px 24px;}
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .newsletter{ grid-template-columns: 1fr; padding: 56px 32px; }
}
@media (max-width: 720px){
  .blog-head{ padding: 56px 0 32px;}
  .featured{ padding: 32px 0 16px;}
  .feature-card{ background: transparent;}
  .feature-card h2{ font-size: 24px;}
  .grid-section{ padding: 20px 0 40px;}
  /* App-style article list: thumbnail left, text column right, row dividers. */
  .grid{ grid-template-columns: 1fr; gap: 0;}
  .card{
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 14px;
    transition: background .15s ease;
  }
  .card:last-child{ border-bottom: 0;}
  .card:hover{ transform: none;}
  .card:active{ background: var(--bg-softer);}
  .card-thumb{ display: block;}
  .card .thumb{ margin-bottom: 0; aspect-ratio: 1/1; border-radius: 14px;}
  .card-body{ padding: 2px 0;}
  .card .cat-pill{ font-size: 11px; margin-bottom: 5px;}
  .card h4{ font-size: 15.5px; margin-bottom: 7px; -webkit-line-clamp: 2; line-height: 1.3;}
  .card p.exc{ display: none;}
  .card .foot{ margin-top: 0; font-size: 11.5px;}
  .section-bar{ margin-bottom: 8px;}
  .section-bar h3{ font-size: 20px;}
  .newsletter{ padding: 48px 28px; border-radius: 24px;}
  .newsletter form{ flex-direction: column; background: transparent; padding: 0; gap: 10px;}
  .newsletter input{ background: #fff; border-radius: 14px; padding: 16px 18px; }
  .newsletter button{ height: 52px; border-radius: 14px;}
}
