/*
Theme Name: Budo Channel
Theme URI: https://example.com/budo-channel
Author: Budo Channel
Author URI: https://example.com
Description: A minimal bilingual (JP/EN) WordPress theme for introducing martial arts YouTube channels and videos. Features YouTube channel cards, video embeds, and ad-ready layouts.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: budo-channel
Tags: blog, two-columns, translation-ready, custom-menu, featured-images
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Colors - Sumi ink inspired */
  --bc-black: #1a1a1a;
  --bc-dark: #2d2d2d;
  --bc-gray-900: #333333;
  --bc-gray-700: #555555;
  --bc-gray-500: #888888;
  --bc-gray-300: #cccccc;
  --bc-gray-100: #f0f0f0;
  --bc-white: #fafafa;
  --bc-accent: #c23b22; /* 朱色 - traditional vermillion */
  --bc-accent-hover: #a83220;
  --bc-accent-light: #f5e6e3;
  --bc-link: #2a6496;
  --bc-link-hover: #1a4a6e;

  /* Typography */
  --bc-font-body: "Noto Sans JP", "Noto Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --bc-font-heading: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --bc-font-accent: "Shippori Mincho", "Noto Serif JP", serif;

  /* Spacing */
  --bc-gap: 2rem;
  --bc-gap-sm: 1rem;
  --bc-gap-xs: 0.5rem;
  --bc-gap-lg: 3rem;
  --bc-radius: 4px;
  --bc-radius-lg: 8px;

  /* Layout */
  --bc-max-width: 1200px;
  --bc-content-width: 780px;
  --bc-sidebar-width: 340px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--bc-font-body);
  color: var(--bc-black);
  background-color: var(--bc-white);
  line-height: 1.8;
  letter-spacing: 0.02em;
}

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

a:hover {
  color: var(--bc-link-hover);
}

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

ul, ol {
  list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--bc-font-heading);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.entry-content p {
  margin-bottom: 1.6em;
}

.entry-content h2 {
  margin: 2.5em 0 1em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--bc-gray-100);
}

.entry-content h3 {
  margin: 2em 0 0.8em;
}

.entry-content ul,
.entry-content ol {
  margin: 1em 0 1.6em 1.5em;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 0.4em;
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 4px solid var(--bc-accent);
  background: var(--bc-gray-100);
  font-family: var(--bc-font-accent);
  font-style: italic;
}

/* ============================================
   LAYOUT
   ============================================ */
.site-container {
  max-width: var(--bc-max-width);
  margin: 0 auto;
  padding: 0 var(--bc-gap);
}

.site-content {
  display: grid;
  grid-template-columns: 1fr var(--bc-sidebar-width);
  gap: var(--bc-gap-lg);
  padding: var(--bc-gap-lg) 0;
}

.site-main {
  min-width: 0;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--bc-gray-100);
  background: var(--bc-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: var(--bc-gap-sm);
}

.site-title {
  font-family: var(--bc-font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-title a {
  color: var(--bc-black);
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.site-title a:hover {
  color: var(--bc-accent);
}

.site-title .title-accent {
  color: var(--bc-accent);
  font-family: var(--bc-font-accent);
  font-size: 0.75em;
}

.site-description {
  display: none;
}

/* Navigation */
.main-navigation ul {
  display: flex;
  gap: var(--bc-gap);
  align-items: center;
}

.main-navigation a {
  color: var(--bc-gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.25em 0;
  position: relative;
}

.main-navigation a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bc-accent);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
  width: 100%;
}

.main-navigation a:hover {
  color: var(--bc-black);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.25em;
  margin-left: var(--bc-gap);
  font-size: 0.8125rem;
  font-weight: 500;
}

.language-switcher a,
.language-switcher span {
  padding: 0.25em 0.5em;
  border-radius: var(--bc-radius);
}

.language-switcher .current-lang {
  background: var(--bc-black);
  color: var(--bc-white);
}

.language-switcher a {
  color: var(--bc-gray-500);
}

.language-switcher a:hover {
  color: var(--bc-black);
  background: var(--bc-gray-100);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5em;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bc-black);
  margin: 5px 0;
  transition: 0.3s;
}

/* ============================================
   POSTS / ARTICLES
   ============================================ */

/* Post Card (archive/index) */
.post-card {
  margin-bottom: var(--bc-gap-lg);
  padding-bottom: var(--bc-gap-lg);
  border-bottom: 1px solid var(--bc-gray-100);
}

.post-card:last-child {
  border-bottom: none;
}

.post-card__thumbnail {
  margin-bottom: var(--bc-gap-sm);
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__thumbnail img {
  transform: scale(1.03);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--bc-gap-sm);
  font-size: 0.8125rem;
  color: var(--bc-gray-500);
  margin-bottom: var(--bc-gap-xs);
}

.post-card__category {
  background: var(--bc-accent-light);
  color: var(--bc-accent);
  padding: 0.15em 0.6em;
  border-radius: var(--bc-radius);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card__title {
  font-size: 1.375rem;
  margin-bottom: var(--bc-gap-xs);
}

.post-card__title a {
  color: var(--bc-black);
}

.post-card__title a:hover {
  color: var(--bc-accent);
}

.post-card__excerpt {
  color: var(--bc-gray-700);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Single Post */
.single-post__header {
  margin-bottom: var(--bc-gap-lg);
}

.single-post__meta {
  display: flex;
  align-items: center;
  gap: var(--bc-gap-sm);
  font-size: 0.8125rem;
  color: var(--bc-gray-500);
  margin-bottom: var(--bc-gap-sm);
}

.single-post__title {
  font-size: 2rem;
  line-height: 1.35;
  margin-bottom: var(--bc-gap-sm);
}

.single-post__thumbnail {
  margin-bottom: var(--bc-gap-lg);
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
}

/* ============================================
   YOUTUBE CHANNEL CARD
   ============================================ */
.yt-channel-card {
  display: flex;
  align-items: flex-start;
  gap: var(--bc-gap);
  padding: 1.25rem 1.5rem;
  background: var(--bc-white);
  border: 1px solid var(--bc-gray-300);
  border-radius: var(--bc-radius-lg);
  margin: 1.5em 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.yt-channel-card:hover {
  border-color: var(--bc-gray-500);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.yt-channel-card__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bc-gray-100);
}

.yt-channel-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-channel-card__info {
  flex: 1;
  min-width: 0;
}

.yt-channel-card__name {
  font-family: var(--bc-font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25em;
}

.yt-channel-card__name a {
  color: var(--bc-black);
}

.yt-channel-card__name a:hover {
  color: var(--bc-accent);
}

.yt-channel-card__stats {
  font-size: 0.8125rem;
  color: var(--bc-gray-500);
  margin-bottom: 0.5em;
}

.yt-channel-card__description {
  font-size: 0.875rem;
  color: var(--bc-gray-700);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-channel-card__subscribe {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.75em;
  padding: 0.5em 1.2em;
  background: #c23b22;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--bc-radius);
  transition: background 0.2s ease;
}

.yt-channel-card__subscribe:hover {
  background: var(--bc-accent-hover);
  color: #fff;
}

.yt-channel-card__subscribe svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================
   YOUTUBE VIDEO EMBED
   ============================================ */
.yt-video-embed {
  margin: 1.5em 0;
}

.yt-video-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--bc-radius-lg);
  background: var(--bc-gray-100);
}

.yt-video-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-video-embed__caption {
  margin-top: 0.5em;
  font-size: 0.8125rem;
  color: var(--bc-gray-500);
  text-align: center;
}

/* ============================================
   SIDEBAR
   ============================================ */
.site-sidebar {
  font-size: 0.9375rem;
}

.widget {
  margin-bottom: var(--bc-gap-lg);
}

.widget-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bc-gray-500);
  margin-bottom: var(--bc-gap-sm);
  padding-bottom: var(--bc-gap-xs);
  border-bottom: 2px solid var(--bc-black);
}

.widget ul li {
  padding: 0.5em 0;
  border-bottom: 1px solid var(--bc-gray-100);
}

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

.widget ul li a {
  color: var(--bc-gray-700);
  font-size: 0.875rem;
}

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

/* Ad Widget */
.widget-ad {
  background: var(--bc-gray-100);
  border-radius: var(--bc-radius-lg);
  padding: var(--bc-gap);
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-ad__label {
  font-size: 0.6875rem;
  color: var(--bc-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   AD SLOTS IN CONTENT
   ============================================ */
.ad-slot {
  margin: 2em 0;
  padding: var(--bc-gap);
  background: var(--bc-gray-100);
  border-radius: var(--bc-radius-lg);
  text-align: center;
  min-height: 90px;
}

.ad-slot__label {
  font-size: 0.6875rem;
  color: var(--bc-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--bc-gray-100);
  padding: var(--bc-gap-lg) 0;
  margin-top: var(--bc-gap-lg);
  font-size: 0.8125rem;
  color: var(--bc-gray-500);
}

.site-footer .site-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-nav ul {
  display: flex;
  gap: var(--bc-gap);
}

.footer-nav a {
  color: var(--bc-gray-500);
}

.footer-nav a:hover {
  color: var(--bc-black);
}

.copyright-notice {
  font-size: 0.75rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--bc-gap-xs);
  margin-top: var(--bc-gap-lg);
  padding-top: var(--bc-gap-lg);
  border-top: 1px solid var(--bc-gray-100);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  height: 2.5em;
  padding: 0 0.5em;
  border-radius: var(--bc-radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.pagination a {
  color: var(--bc-gray-700);
  background: var(--bc-gray-100);
}

.pagination a:hover {
  background: var(--bc-black);
  color: var(--bc-white);
}

.pagination .current {
  background: var(--bc-black);
  color: var(--bc-white);
}

/* ============================================
   SEARCH
   ============================================ */
.search-form {
  display: flex;
  gap: 0;
}

.search-form .search-field {
  flex: 1;
  padding: 0.6em 1em;
  border: 1px solid var(--bc-gray-300);
  border-right: none;
  border-radius: var(--bc-radius) 0 0 var(--bc-radius);
  font-family: var(--bc-font-body);
  font-size: 0.875rem;
  outline: none;
}

.search-form .search-field:focus {
  border-color: var(--bc-accent);
}

.search-form .search-submit {
  padding: 0.6em 1.2em;
  background: var(--bc-black);
  color: var(--bc-white);
  border: 1px solid var(--bc-black);
  border-radius: 0 var(--bc-radius) var(--bc-radius) 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: var(--bc-font-body);
  transition: background 0.2s ease;
}

.search-form .search-submit:hover {
  background: var(--bc-accent);
  border-color: var(--bc-accent);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
  text-align: center;
  padding: var(--bc-gap-lg) 0;
}

.error-404__code {
  font-size: 6rem;
  font-family: var(--bc-font-heading);
  font-weight: 700;
  color: var(--bc-gray-100);
  line-height: 1;
}

.error-404__title {
  font-size: 1.5rem;
  margin: var(--bc-gap-sm) 0;
}

.error-404__text {
  color: var(--bc-gray-500);
  margin-bottom: var(--bc-gap);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .site-content {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    border-top: 1px solid var(--bc-gray-100);
    padding-top: var(--bc-gap-lg);
  }
}

@media (max-width: 768px) {
  :root {
    --bc-gap: 1.25rem;
    --bc-gap-lg: 2rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .single-post__title {
    font-size: 1.5rem;
  }

  .site-header .site-container {
    height: 60px;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bc-white);
    border-bottom: 1px solid var(--bc-gray-100);
    padding: var(--bc-gap);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation li {
    border-bottom: 1px solid var(--bc-gray-100);
  }

  .main-navigation a {
    display: block;
    padding: 0.75em 0;
  }

  .language-switcher {
    margin-left: 0;
    padding-top: 0.75em;
  }

  .menu-toggle {
    display: block;
  }

  .yt-channel-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-footer .site-container {
    flex-direction: column;
    gap: var(--bc-gap-sm);
    text-align: center;
  }
}
