/*
Theme Name: Fashion Blog Pro
Description: A modern, fashion-inspired WordPress theme with dynamic content from REST API and Swiper.js horizontal scrolling
Version: 2.0.4
Author: Fashion Blog Team
*/

:root {
  --primary-color: #ffffff;
  --secondary-color: #f8f9fa;
  --accent-color: #007bff;
  --text-primary: #111111;
  --text-secondary: #6c757d;
  --text-muted: #868e96;
  --border-color: #dee2e6;
  --hover-color: #0056b3;
  --font-primary: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Meiryo", sans-serif;
  --font-heading: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Meiryo", sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-light: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --padding-lg: 2rem;
  --padding-md: 1.5rem;
  --padding-sm: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--primary-color);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 2rem;
}
h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: var(--padding-sm) 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--padding-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--padding-md);
}
.site-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}
.site-logo:hover {
  color: var(--accent-color);
  text-decoration: none;
}
.category-navigation ul {
  display: flex;
  list-style: none;
  gap: var(--padding-md);
  margin: 0;
  padding: 0;
}
.category-navigation a {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: var(--transition);
  color: var(--text-primary);
}
.category-navigation a:hover {
  background: var(--secondary-color);
  color: var(--accent-color);
  text-decoration: none;
}
.category-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.category-menu li {
  list-style: none;
}
.category-menu a {
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.category-menu a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* ハンバーガーメニュー */
.hamburger-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ハンバーガーメニューオーバーレイ */
.hamburger-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.hamburger-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ハンバーガーメニュー本体 */
.hamburger-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: white;
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.hamburger-menu.active {
  right: 0;
}

.hamburger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--padding-md);
  border-bottom: 1px solid var(--border-color);
  background: var(--secondary-color);
}

.hamburger-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.hamburger-close {
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.close-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transform-origin: center;
}

.close-line:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-line:nth-child(2) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.hamburger-content {
  padding: var(--padding-md);
}

.hamburger-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--padding-sm) 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.hamburger-category-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--padding-md) 0;
}

.hamburger-category-menu li {
  margin-bottom: 0.5rem;
}

.hamburger-category-menu a {
  display: block;
  padding: 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  background: var(--secondary-color);
}

.hamburger-category-menu a:hover {
  background: var(--accent-color);
  color: white;
  text-decoration: none;
}

.hamburger-toc,
.hamburger-related {
  margin-top: var(--padding-md);
  padding-top: var(--padding-md);
  border-top: 1px solid var(--border-color);
}

.hamburger-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hamburger-toc-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
  line-height: 1.4;
}

.hamburger-toc-nav a:hover {
  background: var(--secondary-color);
  color: var(--accent-color);
  text-decoration: none;
}

.hamburger-toc-nav .toc-h3 {
  margin-left: 1rem;
  font-size: 0.85rem;
}

.hamburger-related-posts {
  display: flex;
  flex-direction: column;
  gap: var(--padding-sm);
}

.hamburger-related-post {
  display: flex;
  gap: var(--padding-sm);
  padding: var(--padding-sm);
  background: var(--secondary-color);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.hamburger-related-post:hover {
  background: var(--secondary-color);
  text-decoration: none;
}

.hamburger-related-post-image {
  width: 60px;
  height: 45px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.hamburger-related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hamburger-related-post-content {
  flex-grow: 1;
}

.hamburger-related-post-title {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.hamburger-related-post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-main {
  margin-top: 80px;
  min-height: calc(100vh - 200px);
}
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
}

/* ヒーローセクション */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 400px;
  overflow: hidden;
}

.hero-slide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s;
}

.hero-slide.active {
  pointer-events: auto;
  z-index: 2;
}

.hero-content {
  background: linear-gradient(
    135deg,
    rgba(30, 30, 40, 0.85) 60%,
    rgba(80, 80, 120, 0.6) 100%
  );
  border-radius: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 2.5rem 2rem 2rem 2rem;
  text-align: center;
  max-width: 90vw;
  margin: 0 auto;
  color: #fff;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo",
    sans-serif;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  position: relative;
  z-index: 2;
  transition: box-shadow 0.4s, background 0.4s, transform 0.4s;
}
.hero-content h1,
.hero-content .hero-header {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  line-height: 1.1;
}
.hero-content p,
.hero-content .hero-lead {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: #e0e6f8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.hero-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}
.hero-slide.active .hero-content {
  transform: translateY(0);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--padding-md);
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.hero-cta {
  display: inline-block;
  background: var(--hover-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}
.hero-cta:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  text-decoration: none;
  color: white;
}

.section-title {
  text-align: center;
  margin-bottom: var(--padding-lg);
  font-size: 2.5rem;
  color: var(--text-primary);
}

/* カルーセル・投稿カード */
.recent-posts-section {
  background: #fffaeed9;
  padding-top: 30px;
  padding-bottom: 30px;
}

/* Heroセクション下端フェードアウト */
.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(248, 249, 250, 0.85) 100%
  );
  z-index: 10;
}

/* Recent Posts Sectionの上端にやわらかい丸みとシャドウ */
.recent-posts-section {
  position: relative;
  background: var(--secondary-color);
  border-radius: 32px 32px 0 0 / 48px 48px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
  margin-top: -40px;
  padding-top: 56px;
}

@media (max-width: 700px) {
  .recent-posts-section {
    border-radius: 20px 20px 0 0 / 32px 32px 0 0;
    margin-top: -24px;
    padding-top: 32px;
  }
  .hero-section::after {
    height: 40px;
  }
}

@media (max-width: 700px) {
  .recent-posts-section {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}
.posts-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--padding-lg);
  margin-bottom: var(--padding-lg);
}
.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-light);
}
.post-image {
  position: relative;
  overflow: hidden;
}
.post-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}
.post-card:hover .post-image img {
  transform: scale(1.05);
}
.post-content {
  padding: var(--padding-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.post-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.post-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.post-title a:hover {
  color: var(--accent-color);
  text-decoration: none;
}
.post-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: auto;
}

/* =====================
   ブログカード（1/3画像・2/3テキスト）
   ===================== */
.blogcard-link {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease-in-out, transform 0.2s;
  min-height: 48px;
  background: #fff;
  width: 100%;
  max-width: 100%;
}
.blogcard-link:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}
.blogcard-image {
  flex: 1 1 33.3333%;
  position: relative;
  min-width: 0;
  min-height: 100px;
  max-width: 33.3333%;
  display: flex;
  align-items: stretch;
}
.blogcard-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blogcard-label {
  position: absolute;
  top: 80%;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  height: auto !important;
  line-height: 1.2;
  min-width: 0;
  max-width: 90%;
  white-space: nowrap;
}
.blogcard-content {
  flex: 1 1 66.6666%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  min-width: 0;
  max-width: 66.6666%;
}
.blogcard-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.blogcard-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.blogcard-title a:hover {
  color: #4a9eff;
  text-decoration: none;
}
.blogcard-snippet {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1rem;
  flex-grow: 1;
}
.blogcard-url {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.75rem;
  word-break: break-all;
}

/* ページネーション */
.pagination-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0 0 0;
  display: flex;
  justify-content: center;
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.page-numbers li {
  list-style: none;
}

.page-numbers a,
.page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
  min-width: 38px;
  min-height: 38px;
  margin: 0;
}

.page-numbers a:hover,
.page-numbers .current {
  background: #111;
  color: #fff;
  border-color: #111;
}

.page-numbers .prev,
.page-numbers .next {
  font-size: 1rem;
  font-weight: 600;
  width: 60px;
  min-width: 60px;
  justify-content: center;
  text-transform: lowercase;
}

.page-numbers .prev:before {
  content: "prev";
}
.page-numbers .next:before {
  content: "next";
}

@media (max-width: 600px) {
  .pagination-wrapper {
    margin: 1.2rem 0 0 0;
  }
  .page-numbers a,
  .page-numbers span {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 0.95rem;
  }
  .page-numbers .prev,
  .page-numbers .next {
    width: 48px;
    min-width: 48px;
    font-size: 0.95rem;
  }
}

/* 情報セクション */
.information-section {
  padding: var(--padding-lg) 0;
  background: white;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--padding-lg);
}
.info-card {
  background: var(--secondary-color);
  padding: var(--padding-lg);
  border-radius: 12px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-light);
}
.info-icon {
  margin-bottom: var(--padding-md);
  color: var(--accent-color);
}
.info-card h3 {
  margin-bottom: var(--padding-md);
  color: var(--text-primary);
}
.info-card p {
  color: var(--text-secondary);
  margin-bottom: var(--padding-md);
}
.info-cta {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.info-cta:hover {
  background: var(--hover-color);
  color: white;
  text-decoration: none;
}

/* フッター */
.site-footer {
  background: var(--text-primary);
  color: white;
  padding: var(--padding-lg) 0 var(--padding-md);
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--padding-lg);
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--padding-lg);
  margin-bottom: var(--padding-lg);
}
.footer-section h3 {
  color: white;
  margin-bottom: var(--padding-md);
  font-size: 1.2rem;
}
.footer-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-navigation li {
  margin-bottom: 0.5rem;
}
.footer-navigation a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}
.footer-navigation a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-list li {
  margin-bottom: 0.5rem;
}
.category-list a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}
.category-list a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}
.contact-link {
  display: inline-block;
  background: var(--hover-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}
.contact-link:hover {
  background: var(--accent-color);
  color: white;
  text-decoration: none;
}
.footer-bottom {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid var(--border-color);
  padding-top: var(--padding-md);
}

/* ブログ記事ページ */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--padding-lg);
  margin-top: var(--padding-lg);
}

.single-post {
  background: white;
  border-radius: 16px;
  padding: 3px;
  box-shadow: var(--shadow);
}

.post-header {
  margin-bottom: var(--padding-lg);
}

.post-meta-top {
  display: flex;
  align-items: center;
  gap: var(--padding-md);
  margin-bottom: var(--padding-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.post-date {
  color: var(--text-secondary);
  font-weight: 500;
}

.post-categories {
  display: flex;
  gap: 0.5rem;
}

.category-link {
  background: var(--secondary-color);
  color: var(--text-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}

.category-link:hover {
  background: var(--accent-color);
  color: white;
  text-decoration: none;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--padding-md);
  color: var(--text-primary);
}

.post-meta-bottom {
  display: flex;
  gap: var(--padding-lg);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.post-author,
.post-reading-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-label,
.reading-time-label {
  font-weight: 600;
  color: var(--text-primary);
}

.post-featured-image-wrapper {
  margin-bottom: var(--padding-lg);
  border-radius: 12px;
  overflow: hidden;
}

.post-featured-image {
  width: 100%;
  height: auto;
  display: block;
}

.featured-image-caption {
  background: var(--secondary-color);
  padding: var(--padding-sm);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 2.5rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
  color: var(--text-primary);
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.post-content h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.post-content blockquote {
  background: var(--secondary-color);
  border-left: 4px solid var(--accent-color);
  padding: var(--padding-md);
  margin: 1.5rem 0;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-footer {
  margin-top: var(--padding-lg);
  padding-top: var(--padding-lg);
  border-top: 1px solid var(--border-color);
}

.post-tags {
  margin-bottom: var(--padding-lg);
}

.tags-title {
  font-size: 1.2rem;
  margin-bottom: var(--padding-sm);
  color: var(--text-primary);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-link {
  background: var(--secondary-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}

.tag-link:hover {
  background: var(--accent-color);
  color: white;
  text-decoration: none;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--padding-md);
}

.nav-previous,
.nav-next {
  background: var(--secondary-color);
  border-radius: 12px;
  transition: var(--transition);
  overflow: hidden;
}

.nav-previous:hover,
.nav-next:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.nav-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
  padding: var(--padding-sm) var(--padding-sm) 0;
}

.nav-link {
  display: flex;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
  padding: 0 var(--padding-sm) var(--padding-sm);
}

.nav-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: var(--padding-sm);
}

.nav-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.nav-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  flex-grow: 1;
}

.nav-previous:hover .nav-link,
.nav-next:hover .nav-link {
  color: var(--text-primary);
}

.nav-previous:hover .nav-title,
.nav-next:hover .nav-title {
  color: var(--text-primary);
}

.nav-previous:hover .nav-excerpt,
.nav-next:hover .nav-excerpt {
  color: var(--text-secondary);
}

/* サイドバー */
.post-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.table-of-contents,
.related-posts {
  background: white;
  border-radius: 12px;
  padding: var(--padding-md);
  margin-bottom: var(--padding-md);
  box-shadow: var(--shadow);
}

.toc-title,
.related-title {
  font-size: 1.3rem;
  margin-bottom: var(--padding-md);
  color: var(--text-primary);
  font-weight: 600;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
  line-height: 1.4;
}

.toc-item:hover {
  background: var(--secondary-color);
  text-decoration: none;
}

.toc-h3 {
  margin-left: 1rem;
  font-size: 0.9rem;
}

.no-toc {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: var(--padding-md);
}

.related-posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--padding-md);
}

.related-post {
  background: var(--secondary-color);
  border-radius: 12px;
  transition: var(--transition);
  overflow: hidden;
}

.related-post:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.related-post-link {
  display: flex;
  color: var(--text-primary);
  text-decoration: none;
  padding: var(--padding-sm);
}

.related-post-link:hover {
  text-decoration: none;
}

.related-post-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: var(--padding-sm);
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-post-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.related-post-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.related-post-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  flex-grow: 1;
}

.related-post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.related-post:hover .related-post-title {
  color: var(--text-primary);
}

.related-post:hover .related-post-excerpt {
  color: var(--text-secondary);
}

.related-post:hover .related-post-date {
  color: var(--text-muted);
}

.no-related-posts {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: var(--padding-md);
}

/* Cocoonブロックのブログカード追加スタイル */
.wp-block-cocoon-blocks-blogcard {
  position: relative;
}

.wp-block-cocoon-blocks-blogcard a {
  display: flex;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.wp-block-cocoon-blocks-blogcard .blogcard-label {
  position: absolute;
  top: 80%;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  z-index: 2;
}

.wp-block-cocoon-blocks-blogcard .blogcard-snippet {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.wp-block-cocoon-blocks-blogcard .blogcard-url {
  color: var(--text-muted);
  font-size: 0.8rem;
  word-break: break-all;
}

/* ブログカードのローディングとエラー状態 */
.blogcard-loading,
.blogcard-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--padding-lg);
  background: var(--secondary-color);
  border-radius: 12px;
  color: var(--text-secondary);
  font-style: italic;
  min-height: 150px;
}

.blogcard-loading::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.blogcard-link {
  display: flex;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.blogcard-link:hover {
  text-decoration: none;
  color: inherit;
}

/* ブログカードのレスポンシブ対応 - 1/3と2/3の比率を維持 */
@media (max-width: 1200px) {
  .blogcard-image {
    width: 33.333%;
    height: 100%;
    min-height: 100px;
  }

  .blogcard-content {
    width: 66.667%;
  }
}

@media (max-width: 768px) {
  .hamburger-menu-toggle {
    display: flex !important;
  }
  .blogcard-link {
    flex-direction: column;
    min-height: 0;
  }
  .blogcard-image,
  .blogcard-content {
    flex: unset;
    width: 100%;
    max-width: 100%;
  }
  .blogcard-image {
    min-height: 120px;
    max-width: 100%;
  }
  .blogcard-content {
    padding: 1rem;
  }
  .blogcard-snippet {
    font-size: 0.85rem;
    -webkit-line-clamp: 4;
  }
  .post-sidebar {
    display: none !important;
  }
  .post-layout {
    grid-template-columns: 1fr !important;
  }
  .post-sidebar {
    display: none !important;
  }
  .desktop-nav,
  .category-navigation {
    display: none !important;
  }
  .blogcard-content {
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  .header-container,
  .footer-container,
  .container {
    padding: 0 0.75rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .posts-carousel,
  .info-grid,
  .footer-content {
    grid-template-columns: 1fr;
  }
  .hero-section {
    min-height: 300px;
  }

  .post-title {
    font-size: 1.8rem;
  }
  .post-meta-bottom {
    flex-direction: column;
    gap: 0.5rem;
  }
  .post-navigation {
    grid-template-columns: 1fr;
  }

  /* 前の記事・関連記事の2カラムレイアウト */
  .nav-link,
  .related-post-link {
    flex-direction: column;
  }

  .nav-image,
  .related-post-image {
    width: 100%;
    height: 120px;
    margin-right: 0;
    margin-bottom: var(--padding-sm);
  }

  .nav-content,
  .related-post-content {
    text-align: center;
  }

  .blogcard-image {
    width: 33.333%;
    height: 100%;
    min-height: 70px;
  }

  .blogcard-content {
    width: 66.667%;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* より小さいスマートフォン用のパッディング調整 */
@media (max-width: 400px) {
  .header-container,
  .footer-container,
  .container {
    padding: 0 0.5rem;
  }

  .hero-content {
    padding: 0 0.5rem;
  }

  .post-content {
    padding: 0 0.5rem;
  }
}

/* Focus States for Accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.top-layout {
  display: grid !important;
  grid-template-columns: 260px 1fr !important;
  align-items: flex-start !important;
  width: 100% !important;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  width: 100%;
  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
}

@media (max-width: 1100px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
}

.top-article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  box-shadow: none;
  transition: background 0.2s;
  width: 100%;
  max-width: 100%;
}

.top-article-card:hover {
  background: #fafafa;
  box-shadow: none;
}

.top-article-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 20px;
}

.top-article-label {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  line-height: 1.2;
}

.top-article-content {
  padding: 0.8rem 0.8rem 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.top-article-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.2rem 0;
  line-height: 1.3;
}
@media (max-width: 1100px) {
  .top-article-title {
    font-size: 0.9rem;
  }
}
@media (max-width: 700px) {
  .top-article-title {
    font-size: 0.85rem;
  }
}

.top-article-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.top-article-title a:hover {
  text-decoration: underline;
}

.top-article-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-article-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  letter-spacing: 0.05em;
  align-self: flex-end;
}

.category-sidebar {
  background: #f3f3f3;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.category-sidebar li {
  border-bottom: 1px solid #ddd;
  padding: 2.2rem 1.2rem 2.2rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.category-sidebar li:last-child {
  border-bottom: none;
}

.category-sidebar a {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: #111;
  flex-wrap: nowrap;
  min-width: 0;
}

.cat-en {
  font-size: 2.1rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  color: #111;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-arrow {
  font-size: 2rem;
  margin-left: 1.2rem;
  color: #111;
  flex-shrink: 0;
}

.cat-ja {
  font-size: 1rem;
  color: #222;
  margin-left: 1.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-en,
.cat-ja {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: block;
}
.category-sidebar a {
  flex-direction: column;
  align-items: flex-start;
}

.category-sidebar,
.category-sidebar ul,
.category-sidebar li,
.category-sidebar a {
  max-width: 100%;
  overflow-x: hidden;
}

.cat-en,
.cat-ja,
.cat-arrow {
  display: block;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 900px) {
  .top-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .category-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    border-right: none !important;
    background: none;
    box-shadow: none;
    padding: 0.5rem 0 1.2rem 0;
  }
  .category-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.2rem;
    padding: 0;
    margin: 0;
  }
  .category-sidebar li {
    border: none;
    padding: 0;
    margin: 0;
    background: #f3f3f3;
    border-radius: 20px;
    display: inline-block;
    min-width: 0;
  }
  .category-sidebar a {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    color: #111;
    min-width: 0;
    width: auto;
    display: flex;
    gap: 0.5rem;
  }
  .cat-en,
  .cat-ja {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: #111;
    display: inline;
    white-space: nowrap;
  }
  .cat-arrow {
    display: none;
  }
}

/* Apple.com風 Heroセクション */
.hero-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  transition: opacity 0.8s, background-image 0.8s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  z-index: 1;
  pointer-events: none;
}
.hero-slide.active {
  z-index: 2;
  pointer-events: auto;
}
.hero-content {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: opacity 0.8s, transform 0.8s;
  transform: translateY(0);
}
.hero-slide:not(.active) .hero-content {
  transform: translateY(40px);
}

/* Hero Section: 縦積み・全画面スライド */
.hero-section {
  width: 100%;
  position: relative;
}
.hero-slide {
  height: 100vh;
  width: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
