/*
Theme Name: CANOPUS
Theme URI: https://example.com/canopus
Author: Your Name
Author URI: https://example.com
Description: Lightweight, SEO-friendly WordPress theme for the CANOPUS project.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: canopus
Domain Path: /languages
*/

/* ===========================
   Reset & Base
   =========================== */

html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #fff;
}

/* 画像・埋め込み要素のレスポンシブ対応 */
img,
video {
  max-width: 100%;
  height: auto;
}

/* リンク */
a {
  color: #0066cc;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* 見出し */
h1, h2, h3, h4, h5, h6 {
  margin: 1.5em 0 0.75em;
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 1.875rem; /* 30px */
}

h2 {
  font-size: 1.5rem; /* 24px */
}

h3 {
  font-size: 1.25rem; /* 20px */
}

/* 段落・リスト */
p {
  margin: 0 0 1.25em;
}

ul, ol {
  margin: 0 0 1.25em 1.5em;
  padding: 0;
}

/* テーブル（デフォルトの最低限） */
table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid #ddd;
  padding: 0.5em;
}

/* ===========================
   Layout Helpers
   =========================== */

.cp-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.cp-site-main {
  margin: 2rem 0;
}

/* サイドバーありレイアウト用 */
.cp-layout {
  display: flex;
  gap: 2rem;
}

.cp-layout__main {
  flex: 1 1 auto;
}

.cp-layout__sidebar {
  flex: 0 0 300px;
}

/* 小さい画面では縦並びに */
@media (max-width: 768px) {
  .cp-layout {
    flex-direction: column;
  }

  .cp-layout__sidebar {
    flex: 1 1 auto;
  }
}

/* ===========================
   Header / Footer
   =========================== */

.cp-site-header {
  border-bottom: 1px solid #eee;
  padding: 0.75rem 0;
}

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

.cp-site-title {
  font-size: 1.5rem;
  margin: 0;
}

.cp-site-description {
  font-size: 0.875rem;
  color: #666;
  margin: 0.25rem 0 0;
}

/* グローバルメニュー用（後で調整可） */
.cp-global-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cp-global-nav a {
  font-size: 0.9375rem;
}

/* フッター */
.cp-site-footer {
  border-top: 1px solid #eee;
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: #777;
  text-align: center;
}

/* ===========================
   Post / Page
   =========================== */

.cp-entry {
  margin-bottom: 2.5rem;
}

.cp-entry-title {
  margin-top: 0;
}

.cp-entry-meta {
  font-size: 0.8125rem;
  color: #777;
  margin-bottom: 0.75rem;
}

.cp-entry-content {
  font-size: 1rem;
}

/* 「続きを読む」ボタンなど */
.cp-button {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid #0066cc;
  background-color: #0066cc;
  color: #fff;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cp-button:hover,
.cp-button:focus {
  background-color: #004d99;
  border-color: #004d99;
  color: #fff;
  text-decoration: none;
}

/* ===========================
   Utility
   =========================== */

.cp-text-center {
  text-align: center;
}

.cp-mt-0 {
  margin-top: 0 !important;
}

.cp-mb-0 {
  margin-bottom: 0 !important;
}

.cp-mb-1 {
  margin-bottom: 0.5rem !important;
}

.cp-mb-2 {
  margin-bottom: 1rem !important;
}

.cp-mb-3 {
  margin-bottom: 1.5rem !important;
}

/* サイドバー無しレイアウト */
.cp-layout--no-sidebar {
  display: block;
}

.cp-layout--no-sidebar .cp-layout__main {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .cp-layout--no-sidebar .cp-layout__main {
    max-width: 100%;
  }
}

/* --------------------------------------
   ページごとのレイアウト幅＆背景
   -------------------------------------- */

.cp-entry-layout {
  padding: 1.5rem;
  border-radius: 4px;
}

/* 狭く */
.cp-entry-layout--narrow {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* 広く */
.cp-entry-layout--wide {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* フルワイド（カラム内で目一杯） */
.cp-entry-layout--full {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

