/*
Theme Name: Chocolat Blog Trial
Theme URI: https://trial.newchocolat.com/
Author: Chocolat
Description: ショコラ広報ブログ再構築実証用の独自テーマ。外部CSS・JavaScriptに依存しません。
Version: 1.0.5
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: chocolat-blog
*/

:root {
  --pink: #f60072;
  --pink-dark: #c9005e;
  --blue: #0877bd;
  --ink: #171717;
  --muted: #707070;
  --line: #e8e8e8;
  --bg: #f5f6f8;
  --white: #fff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --radius: 12px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #ffbf00;
  outline-offset: 3px;
}
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-wrap { width: min(calc(100% - 32px), var(--wrap)); margin-inline: auto; }
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  color: #fff;
  background: linear-gradient(90deg, #ff0780, #eb006c);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .14);
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; min-height: 66px; gap: 28px; }
.brand { flex: 0 0 190px; }
.brand img { width: 156px; max-height: 54px; object-fit: contain; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.main-nav a {
  display: block;
  padding: 19px 15px;
  font-weight: 800;
  font-size: 15px;
}
.main-nav a:hover { background: rgba(255,255,255,.14); }
.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  padding: 10px 12px;
  color: #fff;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}
.menu-toggle span { display: block; font-size: 25px; line-height: 1; }
.header-official { display: none; }
.announcement { color: #fff; background: var(--blue); text-align: center; font-weight: 800; }
.announcement a { display: block; padding: 9px 16px; }
.hero { background: #fff; }
.hero img { width: 100%; max-height: 470px; object-fit: cover; object-position: center; }
.featured-strip { padding: 14px 0 22px; background: #fff; }
.featured-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(185px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--pink) #eee;
}
.featured-card {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}
.featured-card img { width: 100%; aspect-ratio: 1.62; object-fit: cover; }
.featured-card strong { display: block; padding: 9px 10px 12px; font-size: 14px; line-height: 1.55; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding-block: 30px 70px; }
.main-column, .sidebar-section, .article-single, .not-found {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.main-column { padding: 30px; }
.section-title {
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 4px solid var(--pink);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.35;
}
.post-list { display: grid; gap: 22px; }
.post-card {
  display: grid;
  grid-template-columns: minmax(200px, 36%) 1fr;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.post-card:last-child { border-bottom: 0; }
.post-card-thumb { display: block; overflow: hidden; border-radius: 9px; background: #eee; }
.post-card-thumb img { width: 100%; height: 100%; min-height: 185px; aspect-ratio: 1.62; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-thumb img { transform: scale(1.025); }
.post-card h2 { margin: 3px 0 8px; font-size: clamp(18px, 2.3vw, 24px); line-height: 1.45; }
.post-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 13px; }
.cat-chip { display: inline-block; padding: 2px 9px; color: #fff; background: var(--pink); border-radius: 999px; font-weight: 800; }
.excerpt { margin: 10px 0 0; color: #4b4b4b; font-size: 15px; }
.sidebar { display: grid; align-content: start; gap: 18px; }
.sidebar-section { padding: 20px; }
.sidebar-section h2 { margin: 0 0 14px; font-size: 18px; border-bottom: 2px solid var(--pink); }
.search-form { display: flex; }
.search-field { width: 100%; min-width: 0; padding: 11px; border: 1px solid #ccc; border-radius: 7px 0 0 7px; font: inherit; }
.search-submit { border: 0; padding: 0 14px; color: #fff; background: var(--pink); border-radius: 0 7px 7px 0; font-weight: 800; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.side-list a:hover { color: var(--pink); }
.cta-module {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: 28px;
  align-items: center;
  margin: 32px 0;
  padding: 26px;
  color: #fff;
  background: linear-gradient(135deg, #242424, #080808);
  border: 3px solid var(--pink);
  border-radius: var(--radius);
}
.cta-module img { border-radius: 8px; }
.cta-module h2 { margin: 0 0 8px; font-size: clamp(23px, 4vw, 34px); line-height: 1.35; }
.cta-module p { margin: 0 0 18px; }
.cta-button {
  display: inline-block;
  padding: 13px 24px;
  color: #fff;
  background: var(--pink);
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(246,0,114,.3);
}
.cta-button:hover { background: var(--pink-dark); }
.faq-block { margin: 34px 0; }
.faq-block > h2 { font-size: clamp(25px, 4vw, 34px); }
.faq-item { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 48px 16px 18px; color: var(--pink-dark); font-weight: 900; list-style: none; position: relative; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; font-size: 25px; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 18px 18px; }
.article-single { padding: clamp(22px, 5vw, 46px); }
.breadcrumbs { margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.breadcrumbs span { margin: 0 7px; }
.article-single h1 { margin: 0 0 12px; font-size: clamp(27px, 4.4vw, 42px); line-height: 1.38; }
.article-content { font-size: 17px; }
.article-content h2 {
  margin-top: 2.3em;
  padding: 12px 15px;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), #ff4a9d);
  font-size: clamp(23px, 3.5vw, 30px);
  line-height: 1.45;
}
.article-content h3 { margin-top: 2em; padding-left: 12px; border-left: 5px solid var(--pink); font-size: 22px; }
.article-content a { color: #0877bd; text-decoration: underline; }
.article-content img { margin: 24px auto; }
.article-content iframe { max-width: 100%; }
.article-tax { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
.page-numbers { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; }
.page-numbers.current { color: #fff; background: var(--pink); }
.site-footer { padding: 42px 0 88px; color: #fff; background: #161616; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 20px; }
.footer-note { color: #bbb; font-size: 12px; }
.mobile-bar { display: none; }

@media (max-width: 900px) {
  .site-header {
    padding-top: env(safe-area-inset-top);
    background: linear-gradient(#ff3399 0%, #ff0080 25%, #e80074 100%);
  }
  html { background: #ff3399; }
  .admin-bar .site-header { top: 46px; padding-top: 0; }
  .site-header .header-inner { width: 100%; min-height: 50px; gap: 0; }
  .menu-toggle {
    order: 1;
    display: grid;
    place-content: center;
    flex: 0 0 70px;
    width: 70px;
    height: 50px;
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.15;
  }
  .menu-toggle span { margin-bottom: 2px; font-size: 23px; }
  .brand { order: 2; display: grid; place-items: center; flex: 1 1 auto; min-width: 0; }
  .brand img { width: 100px; height: 50px; max-height: 50px; margin: 0 auto; object-fit: contain; }
  .header-official {
    order: 3;
    display: grid;
    place-content: center;
    flex: 0 0 70px;
    width: 70px;
    height: 50px;
    color: #fff;
    text-align: center;
    line-height: 1.15;
  }
  .header-official span { font-size: 23px; line-height: 1; }
  .header-official small { font-size: 11px; font-weight: 800; white-space: nowrap; }
  .main-nav {
    display: none;
    position: absolute;
    inset: calc(env(safe-area-inset-top) + 50px) 0 auto;
    margin: 0;
    padding: 10px 16px 18px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { display: grid; gap: 0; }
  .main-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .hero img { min-height: 0; height: 200px; aspect-ratio: auto; object-fit: cover; object-position: center top; }
  .featured-scroller { grid-auto-columns: calc((100vw - 64px) / 3); }
  .page-grid { grid-template-columns: 1fr; width: 100%; padding-top: 18px; }
  .main-column, .article-single, .not-found { border-radius: 0; box-shadow: none; }
  .sidebar { display: none; }
  .site-footer { padding-bottom: 92px; }
  .mobile-bar {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 59px;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.97);
    box-shadow: 0 -4px 18px rgba(0,0,0,.1);
  }
  .mobile-bar a, .mobile-bar button {
    display: grid;
    place-content: center;
    gap: 1px;
    border: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 11px;
    text-align: center;
  }
  .mobile-bar b { font-size: 20px; line-height: 1; }
}

@media (max-width: 620px) {
  .site-wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .featured-scroller { grid-auto-columns: calc((100vw - 48px) / 2); }
  .announcement a { padding: 8px 12px; font-size: 14px; line-height: 1.45; }
  .main-column { padding: 22px 16px; }
  .post-card { grid-template-columns: 124px 1fr; gap: 12px; }
  .post-card-thumb img { min-height: 96px; aspect-ratio: 1.35; }
  .post-card h2 { margin-top: 0; font-size: 16px; }
  .excerpt { display: none; }
  .post-meta { font-size: 11px; }
  .cta-module { grid-template-columns: 1fr; padding: 20px; }
  .article-single { padding-inline: 17px; }
  .article-content { font-size: 16px; }
}
