/* ==========================================================================
   CSS Variables & System Setup (notion_knowledge Skeleton)
   ========================================================================== */
:root {
  --color-primary: #1B7F4E;
  --color-primary-hover: #14633C;
  --color-primary-light: #F0FDF4;
  --color-accent: #D81B60;
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-surface-hover: #F8FAFC;
  --color-text: #0F172A;
  --color-text-secondary: #475569;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;

  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --max-width: 1140px;
  --header-height: 50px;

  --text-xs: 1rem;       /* 16px min */
  --text-sm: 1rem;       /* 16px min */
  --text-base: 1.0625rem;/* 17px */
  --text-lg: 1.25rem;   /* 20px */
  --text-xl: 1.5rem;    /* 24px */
  --text-2xl: 1.875rem; /* 30px */

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--color-bg);
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Advertising Nodes (Pure placeholders) */
.ad-div {
  display: block;
  width: 100%;
}

/* Media Aspect Ratio Container */
.media-container {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #E2E8F0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.media-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F1F5F9;
  border: 1px dashed var(--color-border);
}

.placeholder-icon {
  font-size: 1.5rem;
}

/* Tags & Badges */
.prop-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(27, 127, 78, 0.2);
}

.prop-meta {
  font-size: 1rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-subtle);
}

.header-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  position: absolute;
  transition: transform 0.2s ease;
}

.hamburger-icon {
  top: 21px;
  left: 12px;
}

.hamburger-icon::before {
  content: '';
  top: -6px;
  left: 0;
}

.hamburger-icon::after {
  content: '';
  top: 6px;
  left: 0;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Layout Container */
.main-container {
  max-width: var(--max-width);
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .layout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
  }
}

/* Section Common */
.section-block {
  margin-bottom: 2.5rem;
}

.section-header {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Callout Cards (Notion Style) */
.hero-callout-section {
  margin-bottom: 2rem;
}

.callout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .callout-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.callout-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-subtle);
}

.callout-card.no-image {
  border-left-color: var(--color-accent);
}

.callout-badge {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout-card.no-image .callout-badge {
  color: var(--color-accent);
}

.callout-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.callout-title {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0.35rem 0;
}

.callout-summary {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.featured-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.featured-card .card-title {
  font-size: 1.125rem;
  line-height: 1.4;
  margin: 0.25rem 0;
}

/* Notion Database Table (property_table_pages) */
.property-table {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.table-header {
  display: none;
  background-color: var(--color-surface-hover);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .table-header {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 120px 100px 110px;
    gap: 1rem;
    align-items: center;
  }
}

.table-row {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border-light);
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background-color: var(--color-surface-hover);
}

@media (min-width: 768px) {
  .table-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 120px 100px 110px;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
  }
}

.table-row .col-media {
  width: 60px;
}

.table-row .col-media .media-container {
  width: 60px;
  height: 45px;
  aspect-ratio: 4 / 3;
}

.table-row .col-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.table-row .col-category,
.table-row .col-time,
.table-row .col-date {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* Sidebar Styling */
.sidebar-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.widget-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.widget-list a {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.widget-list .count {
  color: var(--color-text-muted);
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recent-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.recent-date {
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 600;
}

.recent-title {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.35;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.btn-more {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.25rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
}

.btn-more:hover {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

/* Detail Page Specific */
.detail-article {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.detail-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 1rem;
}

.detail-title {
  font-size: 1.75rem;
  line-height: 1.3;
  margin: 0.5rem 0;
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.share-container {
  margin-top: 2rem;
}

.comment-box-static {
  margin-top: 2rem;
  background-color: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.comment-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

/* Mobile Nav Toggle Active */
@media (max-width: 767px) {
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    box-shadow: var(--shadow-subtle);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}

/* Motion & Reduced Motion */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* all_article log */
.log {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.log__era {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.log__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
}

.log__row:last-child {
  border-bottom: none;
}

/* alone standalone */
.standalone {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.standalone__top {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 1rem;
}

.standalone__top h1 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin: 0.5rem 0;
}

.standalone__body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.comment-box-static textarea {
  width: 100%;
  min-height: 5rem;
  font-size: 1rem;
  font-family: inherit;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  resize: none;
}