/* =====================================================
   KD DRONE STUDIO – Journal / Blog Styles
   ===================================================== */

/* ===== Journal Header ===== */
.journal-header {
  background: #fff;
  padding: 148px 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.journal-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 24px;
  gap: 24px;
}

.journal-title {
  font-family: var(--font-en);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 200;
  letter-spacing: 0.08em;
  color: #0a0a0a;
  line-height: 1;
}

/* ===== Journal Filter ===== */
.journal-filter {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.filter-tag-btn {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0 0 2px;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: rgba(0,0,0,0.35);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-tag-btn:hover {
  color: rgba(0,0,0,0.7);
}

.filter-tag-btn.active {
  color: #0a0a0a;
  border-bottom-color: #0a0a0a;
}

/* ===== Journal Main ===== */
.journal-main {
  background: #fff;
  padding: 64px 0 120px;
}

/* ===== Featured Article ===== */
.j-featured {
  margin-bottom: 72px;
}

.j-featured-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.j-featured-img {
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #e8eaed;
  margin-bottom: 0;
}

.j-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.19,1,0.22,1);
}

.j-featured-link:hover .j-featured-img img {
  transform: scale(1.03);
}

.j-featured-placeholder {
  width: 100%;
  height: 100%;
  background: #e4e6e9;
}

.j-featured-info {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 0 32px;
  padding: 24px 0 0;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.j-featured-info .j-tag {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 12px;
}

.j-featured-title {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-ja);
  font-size: clamp(1.4rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.35;
  color: #0a0a0a;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.j-featured-link:hover .j-featured-title {
  color: #1a6cff;
}

.j-featured-info .j-date {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  padding-bottom: 4px;
}

/* ===== Secondary Grid ===== */
.j-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 48px;
  margin-bottom: 80px;
}

/* ===== Secondary Item ===== */
.j-item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.j-item-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eaecef;
  margin-bottom: 20px;
}

.j-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.19,1,0.22,1);
}

.j-item-link:hover .j-item-img img {
  transform: scale(1.04);
}

.j-item-placeholder {
  width: 100%;
  height: 100%;
  background: #e4e6e9;
}

.j-item-info {
  padding-top: 4px;
}

.j-item-title {
  font-family: var(--font-ja);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.6;
  color: #0a0a0a;
  margin-top: 10px;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.j-item-link:hover .j-item-title {
  color: #1a6cff;
}

/* ===== Shared: Tag & Date ===== */
.j-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.38);
}

.j-date {
  display: block;
  font-family: var(--font-en);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(0,0,0,0.3);
}

/* ===== Empty State ===== */
.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: rgba(0,0,0,0.3);
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ===== Pagination ===== */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.pg-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.05em;
  border: none;
  background: transparent;
  color: rgba(0,0,0,0.35);
  cursor: pointer;
  transition: color 0.2s ease;
}

.pg-btn:hover:not(:disabled) {
  color: #0a0a0a;
}

.pg-btn.active {
  color: #0a0a0a;
  font-weight: 700;
  border-bottom: 2px solid #0a0a0a;
}

.pg-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.pg-arrow {
  font-size: 20px;
}

/* ===== Post Hero ===== */
.post-hero {
  margin-top: var(--header-h);
  height: 55vh;
  min-height: 360px;
  max-height: 560px;
  overflow: hidden;
  position: relative;
  background: #e4e6e9;
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.3) 100%);
}

.post-hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dde0e4 0%, #e8eaed 50%, #dde0e4 100%);
}

/* ===== Post Section ===== */
.post-section {
  background: #ffffff;
  padding: 72px 0 120px;
}

.post-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.35);
  margin-bottom: 52px;
  transition: color 0.2s ease;
}

.post-back-link:hover { color: rgba(0,0,0,0.75); }
.post-back-link svg { flex-shrink: 0; }

.post-header-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.blog-tag {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid rgba(0,0,0,0.14);
  color: rgba(0,0,0,0.45);
}

.post-title {
  font-family: var(--font-ja);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.45;
  color: #0a0a0a;
  margin-bottom: 28px;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 56px;
}

.post-date {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(0,0,0,0.3);
}

/* ===== Markdown Body ===== */
.md-body {
  color: #333;
  font-size: 15px;
  line-height: 2;
}

.md-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0a0a0a;
  margin: 56px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.md-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin: 36px 0 12px;
}

.md-body p { margin-bottom: 24px; }

.md-body ul,
.md-body ol { margin: 0 0 24px 20px; }

.md-body li { margin-bottom: 8px; }

.md-body strong { color: #0a0a0a; font-weight: 700; }

.md-body em { font-style: italic; color: rgba(0,0,0,0.6); }

.md-body a {
  color: var(--clr-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.md-body blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--clr-blue);
  background: rgba(26,108,255,0.04);
  color: rgba(0,0,0,0.55);
}

.md-body blockquote p { margin-bottom: 0; }

.md-body code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.87em;
  background: rgba(0,0,0,0.06);
  padding: 2px 7px;
  border-radius: 3px;
}

.md-body pre {
  background: #f5f6f8;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
}

.md-body pre code { background: none; padding: 0; font-size: 13px; }

.md-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
}

.md-body th,
.md-body td {
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.08);
  text-align: left;
  vertical-align: top;
}

.md-body th {
  background: #f5f6f8;
  font-weight: 700;
  color: #0a0a0a;
}

.md-body img { width: 100%; margin: 32px 0; display: block; }

.md-body hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 52px 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .journal-header-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .journal-title { font-size: 2.2rem; }
  .j-featured-info { grid-template-columns: 1fr; }
  .j-featured-info .j-date { grid-column: 1; grid-row: 3; padding-bottom: 0; margin-top: 8px; }
  .j-grid { grid-template-columns: 1fr; gap: 48px; }
  .j-featured-img { aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
  .journal-main { padding: 40px 0 80px; }
  .j-featured { margin-bottom: 48px; }
}
