/* =====================================================================
   Sidehustle Blog — Main stylesheet
   Zoomy-inspired hover-zoom, hero slider, responsive blog layout
   ===================================================================== */

:root {
  --color-primary: #1a73e8;
  --color-accent:  #ff6b35;
  --color-dark:    #0f1419;
  --color-muted:   #6b7280;
  --color-light:   #f5f7fa;
  --color-white:   #ffffff;
  --color-border:  #e5e7eb;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(15,20,25,0.06), 0 1px 2px rgba(15,20,25,0.04);
  --shadow:    0 4px 14px rgba(15,20,25,0.08);
  --shadow-lg: 0 18px 40px rgba(15,20,25,0.18);

  --container: 1200px;
  --gap: 32px;

  --header-h: 72px;

  --easing: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color .2s var(--easing), opacity .2s var(--easing);
}
a:hover { color: var(--color-accent); }

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 { line-height: 1.4; margin: 0 0 .8em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 720px; }

/* ---------- Buttons ------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .2s var(--easing), background .2s var(--easing), box-shadow .2s var(--easing);
}
.button:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.button-outline {
  background: transparent;
  color: var(--color-dark);
  border: 2px solid var(--color-dark);
}
.button-outline:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

/* ---------- Skip link ---------------------------------------------- */
.skip-link:focus { z-index: 1000; }

/* ---------- Header ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}
.site-branding { display: flex; flex-direction: column; }
.site-title { font-size: 1.25rem; font-weight: 800; margin: 0; letter-spacing: .02em; }
.site-title a { color: var(--color-dark); }
.site-description { font-size: .75rem; color: var(--color-muted); margin: 2px 0 0; }
.custom-logo { max-height: 48px; width: auto; }

.main-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
}
.primary-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.primary-menu a {
  color: var(--color-dark);
  font-weight: 500;
  font-size: .95rem;
  padding: 6px 0;
  position: relative;
}
.primary-menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--easing);
}
.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after { transform: scaleX(1); }

/* Sub-menu */
.primary-menu li { position: relative; }
.primary-menu .sub-menu {
  position: absolute;
  top: 100%; left: 0;
  list-style: none;
  margin: 0; padding: 8px 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s var(--easing);
  z-index: 50;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.primary-menu .sub-menu a { display: block; padding: 8px 16px; }

.header-search {
  display: flex;
  align-items: center;
  background: var(--color-light);
  border-radius: 999px;
  padding: 4px;
}
.header-search input {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: .9rem;
  outline: none;
  width: 200px;
}
.header-search button {
  background: var(--color-dark);
  color: var(--color-white);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .85rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.menu-toggle-bar {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-dark);
  transition: transform .3s var(--easing), opacity .3s var(--easing);
}

/* ---------- Breadcrumbs -------------------------------------------- */
.breadcrumbs {
  background: var(--color-light);
  padding: 12px 0;
  font-size: .85rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0 24px;
  max-width: var(--container);
  margin-left: auto; margin-right: auto;
  color: var(--color-muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--color-border); }

/* ---------- Layout (main + sidebar) ------------------------------- */
.site-content {
  padding: 48px 0 80px;
}
.front-page .content-container { padding: 0; max-width: none; }
.front-page .site-main { padding-top: 0; }

.layout-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--gap);
}
body.no-sidebar .layout-wrap { grid-template-columns: 1fr; }

@media (max-width: 960px) {
  .layout-wrap { grid-template-columns: 1fr; }
}

/* ---------- Hero Slider (Zoomy-style) ------------------------------ */
.hero-slider {
  position: relative;
  width: 100%;
  height: clamp(420px, 70vh, 720px);
  overflow: hidden;
  background: var(--color-dark);
}
.hero-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s var(--easing);
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.hero-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  color: var(--color-white);
}
.hero-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-image img,
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Initial gentle ken-burns when slide is active */
  transform: scale(1.05);
  transition: transform 8s var(--easing);
}
.hero-slide.is-active .hero-image img { transform: scale(1.15); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,20,25,0) 0%, rgba(15,20,25,0.85) 100%);
  z-index: 1;
}
.hero-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 60px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.hero-category {
  display: inline-block;
  background: var(--color-accent);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  text-shadow: 0 2px 16px rgba(0,0,0,.4);
}
.hero-excerpt {
  font-size: 1rem;
  max-width: 720px;
  margin: 0 0 20px;
  opacity: .92;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-cta {
  display: inline-block;
  padding: 12px 28px;
  background: var(--color-white);
  color: var(--color-dark);
  border-radius: 999px;
  font-weight: 700;
  transition: transform .3s var(--easing), background .3s var(--easing), color .3s var(--easing);
}
.hero-link:hover .hero-cta {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateX(4px);
}

/* Nav arrows */
.hero-prev, .hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: var(--color-white);
  font-size: 28px;
  line-height: 48px;
  text-align: center;
  backdrop-filter: blur(4px);
  transition: background .2s var(--easing), transform .2s var(--easing);
}
.hero-prev { left: 24px; }
.hero-next { right: 24px; }
.hero-prev:hover, .hero-next:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

/* Dots */
.hero-dots {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero-dot {
  width: 32px; height: 4px;
  background: rgba(255,255,255,.35);
  border-radius: 2px;
  transition: background .3s var(--easing), width .3s var(--easing);
}
.hero-dot.is-active { background: var(--color-white); width: 56px; }

@media (max-width: 640px) {
  .hero-prev, .hero-next { display: none; }
  .hero-copy { padding: 40px 20px; }
}

/* ---------- Zoom-on-hover (Zoomy signature) ----------------------- */
.zoom-on-hover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.zoom-on-hover img {
  transition: transform .8s var(--easing), filter .5s var(--easing);
  will-change: transform;
}
a:hover .zoom-on-hover img,
.zoom-on-hover:hover img {
  transform: scale(1.1);
}
.zoom-on-hover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.4) 100%);
  opacity: 0;
  transition: opacity .4s var(--easing);
  pointer-events: none;
}
a:hover .zoom-on-hover::after,
.zoom-on-hover:hover::after { opacity: 1; }

/* ---------- Section title ---------------------------------------- */
.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 0 32px;
  gap: 4px;
}
.section-title-en {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--color-primary);
  font-family: "Georgia", serif;
}
.section-title-jp {
  font-size: .9rem;
  color: var(--color-muted);
  letter-spacing: .1em;
}

.front-section { padding: 60px 0; }
.section-more { text-align: center; margin-top: 32px; }

/* ---------- Category grid ---------------------------------------- */
.category-grid-section {
  background: var(--color-light);
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .category-grid { grid-template-columns: 1fr; } }

.category-tile {
  position: relative;
  aspect-ratio: 16 / 10;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.category-tile-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--easing);
}
.category-tile-placeholder {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-white);
}
.category-tile:hover .category-tile-img { transform: scale(1.1); }
.category-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,20,25,.1) 0%, rgba(15,20,25,.75) 100%);
  z-index: 1;
}
.category-tile-text {
  position: absolute;
  left: 24px; right: 24px; bottom: 20px;
  z-index: 2;
}
.category-tile-name {
  font-size: 1.5rem;
  margin: 0 0 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.category-tile-count {
  font-size: .85rem;
  opacity: .9;
}

/* ---------- Ranking ----------------------------------------------- */
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  counter-reset: rank;
}
.ranking-item {
  border-radius: var(--radius);
  background: var(--color-white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--easing), box-shadow .3s var(--easing);
}
.ranking-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.ranking-link {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 16px;
  color: var(--color-dark);
  align-items: start;
  position: relative;
}
.ranking-number {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  font-family: "Georgia", serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-white);
  background: var(--color-dark);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ranking-item.rank-1 .ranking-number { background: #d4af37; }
.ranking-item.rank-2 .ranking-number { background: #c0c0c0; color: #333; }
.ranking-item.rank-3 .ranking-number { background: #cd7f32; }
.ranking-thumb {
  width: 100px; height: 100px;
  flex-shrink: 0;
}
.ranking-thumb img,
.ranking-thumb .thumb-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
}
.ranking-body { min-width: 0; }
.ranking-title {
  font-size: 1rem;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
  color: var(--color-muted);
}
.ranking-category {
  color: var(--color-primary);
  font-weight: 500;
}

/* ---------- Post card grid --------------------------------------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}
.posts-grid-compact { gap: 20px; }

.post-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--easing), box-shadow .3s var(--easing);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.post-card-link {
  display: flex;
  flex-direction: column;
  color: var(--color-dark);
  height: 100%;
}
.post-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-light);
  border-radius: 0;
}
.post-card-thumb img,
.post-card-thumb .thumb-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
}
.thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-white);
  font-size: 2rem;
  font-weight: 800;
}
.post-card-category {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  background: rgba(15,20,25,.85);
  color: var(--color-white);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
}
.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-excerpt {
  font-size: .85rem;
  color: var(--color-muted);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  margin-top: auto;
  font-size: .8rem;
  color: var(--color-muted);
}

/* ---------- Page header ------------------------------------------ */
.page-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-dark);
}
.page-title {
  font-size: 1.75rem;
  margin: 0;
}
.archive-description, .search-count {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: .95rem;
}

/* ---------- Single post ------------------------------------------ */
.single-post .entry-header {
  margin-bottom: 24px;
  text-align: center;
}
.single-post .entry-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 8px 0 12px;
}
.entry-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: .85rem;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.entry-meta .entry-category {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .75rem;
}
.entry-sub {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: .85rem;
  color: var(--color-muted);
}
.entry-thumbnail {
  margin: 0 0 32px;
  border-radius: var(--radius-lg);
}
.entry-thumbnail img { width: 100%; }
.entry-content {
  font-size: 1rem;
  line-height: 1.9;
}
.entry-content h2 {
  font-size: 1.6rem;
  margin: 2em 0 .8em;
  padding: 16px 20px;
  border-left: 6px solid var(--color-primary);
  background: var(--color-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry-content h3 {
  font-size: 1.3rem;
  margin: 1.6em 0 .6em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}
.entry-content h4 {
  font-size: 1.1rem;
  margin: 1.4em 0 .5em;
  padding-left: 12px;
  border-left: 4px solid var(--color-accent);
}
.entry-content p { margin: 0 0 1.2em; }
.entry-content img {
  border-radius: var(--radius);
  margin: 1em 0;
}
.entry-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 20px 24px;
  background: var(--color-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-muted);
}
.entry-content code {
  background: var(--color-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}
.entry-content pre {
  background: var(--color-dark);
  color: #e5e7eb;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .9rem;
}
.entry-content ul, .entry-content ol {
  padding-left: 1.6em;
  margin: 1em 0;
}
.entry-content li { margin-bottom: .5em; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.entry-content th, .entry-content td {
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  text-align: left;
}
.entry-content th { background: var(--color-light); }

.entry-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.entry-tags a {
  font-size: .8rem;
  background: var(--color-light);
  color: var(--color-muted);
  padding: 4px 12px;
  border-radius: 999px;
}
.entry-tags a:hover { background: var(--color-primary); color: var(--color-white); }

.ad-after-content,
.ad-in-article {
  margin: 2em 0;
  text-align: center;
}

/* ---------- Share buttons ---------------------------------------- */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  transition: transform .2s var(--easing), opacity .2s var(--easing);
}
.share-btn:hover { transform: translateY(-2px); opacity: .85; }
.share-x    { background: #000; color: #fff; }
.share-fb   { background: #1877f2; color: #fff; }
.share-line { background: #06c755; color: #fff; }
.share-copy { background: var(--color-light); color: var(--color-dark); }

/* ---------- Author bio ------------------------------------------- */
.author-bio {
  margin: 40px 0;
  padding: 24px;
  background: var(--color-light);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: center;
}
.author-bio-avatar img { border-radius: 50%; }
.author-bio-name { margin: 0 0 4px; }
.author-bio-desc { font-size: .9rem; color: var(--color-muted); margin: 0; }

/* ---------- Related posts ---------------------------------------- */
.related-posts {
  margin: 48px 0;
}
.related-posts .section-title {
  font-size: 1.5rem;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  border-bottom: 2px solid var(--color-dark);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

/* ---------- Comments --------------------------------------------- */
.comments-area {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { margin-bottom: 24px; padding: 16px; background: var(--color-light); border-radius: var(--radius); }
.comment-meta { font-size: .85rem; color: var(--color-muted); margin-bottom: 8px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  margin-top: 4px;
}
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit input { background: var(--color-primary); color: #fff; border: 0; padding: 12px 28px; border-radius: 999px; font-weight: 700; cursor: pointer; }

/* ---------- Sidebar ---------------------------------------------- */
.widget-area .widget {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.widget-title {
  font-size: 1rem;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-dark);
}
.widget ul { list-style: none; padding: 0; margin: 0; }

/* Popular / Recent widgets */
.popular-posts, .recent-posts { padding: 0; margin: 0; list-style: none; }
.popular-item, .recent-item {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.popular-item:last-child, .recent-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.popular-link, .recent-link {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--color-dark);
  font-size: .9rem;
}
.popular-thumb, .recent-thumb {
  width: 60px; height: 60px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.popular-thumb img, .recent-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.popular-rank {
  display: none;
}
.recent-meta { display: flex; flex-direction: column; }
.recent-date { font-size: .75rem; color: var(--color-muted); margin-top: 4px; }

/* ---------- Pagination ------------------------------------------- */
.pagination {
  margin: 40px 0;
}
.pagination ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--color-light);
  color: var(--color-dark);
  font-weight: 500;
  transition: background .2s var(--easing), color .2s var(--easing);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

/* ---------- 404 -------------------------------------------------- */
.error-404 {
  padding: 80px 0;
  text-align: center;
}
.error-title {
  font-size: 6rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  line-height: 1;
}
.error-message { font-size: 1.25rem; margin: 16px 0; }
.back-home { margin-top: 32px; }

/* ---------- Footer ----------------------------------------------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,.85);
  padding: 60px 0 40px;
  margin-top: 80px;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--color-accent); }

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-widgets .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,.2); }

.footer-bottom {
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-site-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}
.footer-menu-list {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0; padding: 0;
  flex-wrap: wrap;
  font-size: .9rem;
}
.copyright { margin: 0; font-size: .85rem; color: rgba(255,255,255,.6); }

.social-links {
  display: flex;
  gap: 8px;
}
.sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  transition: background .2s var(--easing), transform .2s var(--easing);
}
.sns-link:hover { background: var(--color-accent); transform: translateY(-2px); }

/* Back to top */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-dark);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--easing), transform .3s var(--easing);
  z-index: 99;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-accent); transform: translateY(-3px); }

/* ---------- Mobile menu ------------------------------------------ */
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }

  .main-navigation {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s var(--easing);
    z-index: 99;
  }
  .main-navigation.is-open { transform: translateX(0); }

  .primary-menu { flex-direction: column; gap: 0; }
  .primary-menu li { border-bottom: 1px solid var(--color-border); }
  .primary-menu a { display: block; padding: 16px 0; }
  .primary-menu .sub-menu {
    position: static;
    border: 0; padding: 0 0 0 16px;
    box-shadow: none;
    opacity: 1; visibility: visible;
    transform: none;
  }
  .primary-menu .sub-menu a { padding: 12px 0; font-size: .9rem; }

  .header-search { margin-top: 16px; width: 100%; }
  .header-search input { width: 100%; }

  body.menu-open { overflow: hidden; }
  body.menu-open .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .menu-toggle-bar:nth-child(2) { opacity: 0; }
  body.menu-open .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Print ------------------------------------------------- */
@media print {
  .site-header, .site-footer, .widget-area, .share-buttons, .related-posts, .back-to-top, .hero-slider { display: none !important; }
}

/* ---------- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-slide.is-active .hero-image img { transform: scale(1); }
}
