@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** トップページ候補 post_id=440 専用
************************************/
.puu-home {
  --puu-home-primary: #1f4e79;
  --puu-home-link: #1a5fb4;
  --puu-home-bg: #f7f9fc;
  --puu-home-border: #dce5ef;
  --puu-home-text: #243447;
  --puu-home-muted: #5f6f7f;
  color: var(--puu-home-text);
  max-width: 1120px;
  margin-inline: auto;
}

.puu-home,
.puu-home * {
  box-sizing: border-box;
}

.puu-home > .wp-block-group {
  margin-block: 0 3.5rem;
}

.puu-home > .wp-block-group:not(.puu-home-hero):not(.puu-home-forward) {
  padding-inline: clamp(0rem, 2vw, 1rem);
}

.puu-home .wp-block-heading {
  color: var(--puu-home-primary);
  overflow-wrap: anywhere;
}

.puu-home h2.wp-block-heading {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 2.7vw, 2.05rem);
  line-height: 1.35;
}

.puu-home h3.wp-block-heading {
  margin: 0 0 0.75rem;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.45;
}

.puu-home p {
  line-height: 1.85;
}

.puu-home a {
  color: var(--puu-home-link);
  text-underline-offset: 0.18em;
}

.puu-home a:hover,
.puu-home a:focus-visible {
  color: var(--puu-home-primary);
}

.puu-home-hero {
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4rem);
  border: 1px solid var(--puu-home-border);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5fb 100%);
}

.puu-home-hero h2.wp-block-heading {
  max-width: 18em;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.25;
}

.puu-home-hero p {
  max-width: 46rem;
  margin-block: 0 1rem;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.puu-home-hero .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

.puu-home-hero .wp-block-button__link {
  min-width: 13.5rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--puu-home-primary);
  border-radius: 7px;
  background: var(--puu-home-primary);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
}

.puu-home-hero .wp-block-button:nth-child(2) .wp-block-button__link {
  background: #ffffff;
  color: var(--puu-home-primary);
}

.puu-home-hero .wp-block-button__link:hover,
.puu-home-hero .wp-block-button__link:focus-visible {
  filter: brightness(0.96);
  color: #ffffff;
}

.puu-home-hero .wp-block-button:nth-child(2) .wp-block-button__link:hover,
.puu-home-hero .wp-block-button:nth-child(2) .wp-block-button__link:focus-visible {
  color: var(--puu-home-primary);
}

.puu-home .puu-home-interest-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.puu-home .puu-home-interest-heading h2 {
  flex: 1 1 auto;
  margin: 0;
}

.puu-home .puu-home-guide-character {
  flex: 0 0 auto;
  width: 124px;
  max-width: 24%;
  margin: 0;
}

.puu-home .puu-home-guide-character img {
  display: block;
  width: 100%;
  height: auto;
}

.puu-home-interest .wp-block-columns,
.puu-home-beginner .wp-block-columns,
.puu-home-kimarite .wp-block-columns,
.puu-home-ai .wp-block-columns {
  align-items: stretch;
  gap: 1.25rem;
  margin-block: 1.5rem;
}

.puu-home-interest .wp-block-column,
.puu-home-beginner .wp-block-column,
.puu-home-kimarite .wp-block-column,
.puu-home-ai .wp-block-column {
  display: flex;
  min-width: 0;
}

.puu-home-interest .wp-block-column {
  flex: 1 1 0;
}

.puu-home-interest-card,
.puu-home-beginner-card,
.puu-home-kimarite .wp-block-column,
.puu-home-ai .wp-block-column,
.puu-home-latest-card {
  width: 100%;
  padding: 1.35rem;
  border: 1px solid var(--puu-home-border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(31, 78, 121, 0.07);
}

.puu-home-interest-card,
.puu-home-beginner-card,
.puu-home-kimarite .wp-block-column,
.puu-home-ai .wp-block-column {
  display: flex;
  flex-direction: column;
}

.puu-home-interest-card > p:last-child,
.puu-home-beginner-card > p:last-child,
.puu-home-kimarite .wp-block-column > p:last-child,
.puu-home-ai .wp-block-column > p:last-child {
  margin-top: auto;
}

.puu-home-interest-card > p:last-child a,
.puu-home-beginner-card > p:last-child a,
.puu-home-kimarite .wp-block-column > p:last-child a,
.puu-home-ai .wp-block-column > p:last-child a,
.puu-home-field > p:last-child a {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid #b7cbe0;
  border-radius: 6px;
  background: #f8fbff;
  font-weight: 700;
  text-decoration: none;
}

.puu-home-beginner .wp-block-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.puu-home-kimarite .wp-block-columns,
.puu-home-ai .wp-block-columns {
  flex-wrap: wrap;
}

.puu-home-kimarite .wp-block-column,
.puu-home-ai .wp-block-column {
  flex: 1 1 calc(25% - 1.25rem);
}

.puu-home-ai > p:last-child {
  margin-top: 1.25rem;
  text-align: right;
}

.puu-home-ai > p:last-child a {
  display: inline-flex;
  padding: 0.7rem 1.1rem;
  border-bottom: 2px solid var(--puu-home-link);
  font-weight: 700;
  text-decoration: none;
}

.puu-home-forward {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-left: 5px solid var(--puu-home-primary);
  border-radius: 0 10px 10px 0;
  background: #edf4fa;
}

.puu-home-forward > :last-child {
  margin-bottom: 0;
}

.puu-home-field {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--puu-home-border);
  border-radius: 10px;
  background: #ffffff;
}

.puu-home-field .wp-block-image,
.puu-home-field .wp-block-post-featured-image {
  max-width: 46%;
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.puu-home-field::after {
  display: block;
  clear: both;
  content: "";
}

.puu-home-latest .puu-home-latest-query .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}

.puu-home-latest-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.puu-home-latest-card .wp-block-post-featured-image {
  margin: -1.35rem -1.35rem 1.1rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #edf1f5;
}

.puu-home-latest-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.puu-home-latest-card .wp-block-post-title {
  margin-bottom: 0.65rem;
  font-size: 1.12rem;
  line-height: 1.5;
}

.puu-home-latest-card .wp-block-post-date {
  color: var(--puu-home-muted);
  font-size: 0.88rem;
}

.puu-home-latest-card .wp-block-post-excerpt {
  margin-top: auto;
  color: var(--puu-home-muted);
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  .puu-home-interest .wp-block-columns,
  .puu-home-kimarite .wp-block-columns,
  .puu-home-ai .wp-block-columns {
    flex-wrap: wrap;
  }

  .puu-home-interest .wp-block-column,
  .puu-home-kimarite .wp-block-column,
  .puu-home-ai .wp-block-column {
    flex: 1 1 calc(50% - 1.25rem);
  }

  .puu-home-latest .puu-home-latest-query .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/*834px以下*/
@media screen and (max-width: 834px){
  .puu-home > .wp-block-group {
    margin-bottom: 2.75rem;
  }

  .puu-home .puu-home-guide-character {
    width: 104px;
  }

  .puu-home-beginner .wp-block-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .puu-home-beginner .wp-block-column {
    width: auto;
  }

  .puu-home-field .wp-block-image,
  .puu-home-field .wp-block-post-featured-image {
    max-width: 100%;
    float: none;
    margin: 0 0 1.25rem;
  }
}

/*480px以下*/
@media screen and (max-width: 480px){
  .puu-home {
    width: 100%;
  }

  .puu-home > .wp-block-group:not(.puu-home-hero):not(.puu-home-forward) {
    padding-inline: 0;
  }

  .puu-home-hero {
    padding: 2rem 1.1rem;
    border-radius: 10px;
  }

  .puu-home-hero .wp-block-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .puu-home-hero .wp-block-button,
  .puu-home-hero .wp-block-button__link {
    width: 100%;
    min-width: 0;
  }

  .puu-home .puu-home-interest-heading {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
  }

  .puu-home .puu-home-interest-heading h2 {
    width: 100%;
  }

  .puu-home .puu-home-guide-character {
    width: 88px;
    max-width: none;
  }

  .puu-home-interest .wp-block-column,
  .puu-home-kimarite .wp-block-column,
  .puu-home-ai .wp-block-column {
    flex-basis: 100%;
  }

  .puu-home-beginner .wp-block-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .puu-home-latest .puu-home-latest-query .wp-block-post-template {
    grid-template-columns: minmax(0, 1fr);
  }

  .puu-home-interest-card,
  .puu-home-beginner-card,
  .puu-home-kimarite .wp-block-column,
  .puu-home-ai .wp-block-column,
  .puu-home-latest-card {
    padding: 1.1rem;
  }

  .puu-home-latest-card .wp-block-post-featured-image {
    margin: -1.1rem -1.1rem 1rem;
  }
}

/* Phase 7: Hide the auto-generated TOC only on the formal home page. */
body.page-id-440 .puu-home .puu-home-hero > #toc {
  display: none;
}

/* Phase 8: Restore the custom home-page H2 treatment after Cocoon heading styles. */
body.page-id-440 .puu-home h2.wp-block-heading {
  background-color: transparent;
  color: var(--puu-home-primary);
  padding: 0;
  border-radius: 0;
}