/*
Theme Name:   Hiroshi Today Child
Theme URI:    https://hiroshi.today
Description:  Child theme for hiroshi.today — GeneratePress child theme
Author:       Hiroshi
Template:     generatepress
Version:      1.0.0
Text Domain:  hiroshi-today-child
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --ht-navy:        #1a2332;
  --ht-navy-light:  #243447;
  --ht-accent:      #3b82f6;
  --ht-accent-dark: #2563eb;
  --ht-text:        #1e293b;
  --ht-text-muted:  #64748b;
  --ht-bg:          #ffffff;
  --ht-bg-alt:      #f8fafc;
  --ht-border:      #e2e8f0;
  --ht-shadow:      rgba(0, 0, 0, 0.06);
  --ht-radius:      10px;
  --ht-font-ja:     'Noto Sans JP', sans-serif;
  --ht-font-en:     'Inter', sans-serif;
}

/* ============================================================
   BASE TYPOGRAPHY
   ============================================================ */
body {
  font-family: var(--ht-font-ja);
  color: var(--ht-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ht-font-ja);
  line-height: 1.4;
}

/* Navigation uses Inter */
.main-navigation,
.site-header .inside-header {
  font-family: var(--ht-font-en);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--ht-navy);
}

.site-header .inside-header {
  padding: 1rem 1.5rem;
}

.site-title a,
.site-title a:visited {
  color: #ffffff;
  font-family: var(--ht-font-en);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-description {
  color: #94a3b8;
  font-family: var(--ht-font-en);
  font-size: 0.8rem;
}

/* Navigation */
.main-navigation {
  background: var(--ht-navy-light);
}

.main-navigation .inside-navigation {
  padding: 0 1.5rem;
}

.main-navigation ul li a {
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  transition: background 0.2s, color 0.2s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Language switcher (Polylang) */
.lang-switcher-wrap {
  font-family: var(--ht-font-en);
  font-size: 0.8rem;
}

.lang-switcher-wrap a {
  color: #94a3b8;
}

.lang-switcher-wrap a:hover {
  color: #ffffff;
}

/* ============================================================
   CATEGORY LABEL (shared component)
   ============================================================ */
.ht-category-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ht-accent);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.2s;
}

.ht-category-label:hover {
  background: rgba(59, 130, 246, 0.2);
  color: var(--ht-accent-dark);
}

/* ============================================================
   HOMEPAGE — HERO SECTION
   ============================================================ */
.ht-hero-section {
  padding: 2rem 0;
}

.ht-hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: var(--ht-bg-alt);
  border-radius: var(--ht-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--ht-shadow);
}

.ht-hero-image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.ht-hero-content {
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.ht-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.ht-hero-title a {
  color: var(--ht-text);
  text-decoration: none;
}

.ht-hero-title a:hover {
  color: var(--ht-accent);
}

.ht-hero-excerpt {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.9;
  margin: 0;
}

.ht-post-meta {
  font-size: 0.78rem;
  color: var(--ht-text-muted);
  font-family: var(--ht-font-en);
}

/* ============================================================
   HOMEPAGE — SECTION COMMON
   ============================================================ */
.ht-section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--ht-border);
}

.ht-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.ht-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ht-text);
  position: relative;
  padding-left: 1rem;
  margin: 0;
}

.ht-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  background: var(--ht-accent);
  border-radius: 2px;
}

.ht-section-more {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ht-accent);
  text-decoration: none;
  white-space: nowrap;
}

.ht-section-more:hover {
  color: var(--ht-accent-dark);
}

/* ============================================================
   HOMEPAGE — RANDOM PICKS (3-col grid)
   ============================================================ */
.ht-picks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ============================================================
   HOMEPAGE — LATEST POSTS (2-col grid)
   ============================================================ */
.ht-latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ============================================================
   ARTICLE CARD (shared)
   ============================================================ */
.ht-card {
  background: var(--ht-bg);
  border: 1px solid var(--ht-border);
  border-radius: var(--ht-radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
}

.ht-card:hover {
  box-shadow: 0 8px 30px var(--ht-shadow);
  transform: translateY(-2px);
}

.ht-card-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.ht-card-body {
  padding: 1.1rem;
}

.ht-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0.4rem 0 0.3rem;
}

.ht-card-title a {
  color: var(--ht-text);
  text-decoration: none;
}

.ht-card-title a:hover {
  color: var(--ht-accent);
}

.ht-card-excerpt {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.8;
  margin-top: 0.5rem;
}

/* Large card variant (latest posts) */
.ht-card-large .ht-card-title {
  font-size: 1.05rem;
}

.ht-card-large .ht-card-body {
  padding: 1.25rem;
}

/* ============================================================
   HOMEPAGE — PAGINATION
   ============================================================ */
.ht-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--ht-border);
}

.ht-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ht-border);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ht-text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.ht-pagination .page-numbers:hover {
  border-color: var(--ht-accent);
  color: var(--ht-accent);
}

.ht-pagination .page-numbers.current {
  background: var(--ht-accent);
  color: #fff;
  border-color: var(--ht-accent);
  font-weight: 600;
}

/* ============================================================
   SINGLE POST
   ============================================================ */

/* Hero image — smaller than mockup default */
.single .post-image img,
.single .featured-image img,
.single .wp-post-image {
  max-height: 420px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--ht-radius);
  margin-bottom: 1.75rem;
}

/* Article body typography */
.single .entry-content {
  font-size: 1rem;
  line-height: 2;
  color: #334155;
}

.single .entry-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ht-border);
  color: var(--ht-text);
}

.single .entry-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--ht-text);
}

.single .entry-content blockquote {
  border-left: 4px solid var(--ht-accent);
  background: var(--ht-bg-alt);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  color: #475569;
  font-style: italic;
}

/* Post meta bar */
.ht-post-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-family: var(--ht-font-en);
  font-size: 0.8rem;
  color: var(--ht-text-muted);
}

.ht-meta-sep {
  color: var(--ht-border);
}

/* Tags */
.ht-post-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ht-border);
}

.ht-tag {
  font-size: 0.78rem;
  color: var(--ht-text-muted);
  background: var(--ht-bg-alt);
  border: 1px solid var(--ht-border);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
}

.ht-tag:hover {
  border-color: var(--ht-accent);
  color: var(--ht-accent);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.widget-area {
  font-size: 0.88rem;
}

.widget {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--ht-bg-alt);
  border-radius: var(--ht-radius);
  border: 1px solid var(--ht-border);
}

.widget-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ht-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ht-accent);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--ht-border);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--ht-text);
  text-decoration: none;
  font-size: 0.85rem;
}

.widget ul li a:hover {
  color: var(--ht-accent);
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.category-header-area {
  background: var(--ht-bg-alt);
  border-bottom: 1px solid var(--ht-border);
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}

.category-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.category-description {
  font-size: 0.92rem;
  color: #475569;
  max-width: 680px;
  line-height: 1.9;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ht-navy);
  color: #cbd5e1;
}

.site-footer .inside-footer {
  color: #64748b;
  font-family: var(--ht-font-en);
  font-size: 0.8rem;
}

.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: #ffffff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .ht-picks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .ht-hero-card {
    grid-template-columns: 1fr;
  }

  .ht-hero-image {
    min-height: 220px;
    max-height: 280px;
  }

  .ht-hero-content {
    padding: 1.5rem;
  }

  .ht-hero-title {
    font-size: 1.35rem;
  }

  .ht-latest-grid {
    grid-template-columns: 1fr;
  }

  .ht-picks-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .ht-picks-grid {
    grid-template-columns: 1fr;
  }

  .ht-section-header {
    flex-direction: column;
    gap: 0.4rem;
  }

  .ht-hero-title {
    font-size: 1.2rem;
  }
}
