/* css/base.css */

html {
  font-size: 100%;
}

body {
  color: var(--font-color);
  font-family: var(--base-font-family);
}

img {
  max-width: 100%;
  vertical-align: bottom;
}

ul { 
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  opacity: 0.7;
}

.wrapper {
  max-width: var(--content-max-width);
  padding: 0 20px;
  margin: 0 auto;
}

.mainvisual {
  margin-bottom: 80px;
}

.intro {
  margin-bottom: 120px;
  text-align: center;
}

.intro .chatchphrase {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 40px;
}

section h2 {
  font-weight: normal;
  margin-top: 40px;
  margin-bottom: 40px;
  padding-top: 0px;
  margin-top: 0px;
}

section {
  margin-bottom: 120px;
}

#about {
  display: flex;
  align-items: center;
  margin-bottom: 120px;
}

#about .img {
  width: 50%;
}

#about .detail {
  width: 50%;
  padding-left: 40px;
  align-self: flex-start;
}

#about .detail p {
  margin-bottom: 20px;
}


/* =================================
   記事・作品リスト (共通スタイル)
   ================================= */

/* 1. 3カラムのコンテナ */
.article-grid {
    display: flex;
    flex-wrap: wrap;
}

/* 2. 記事・作品ブロック */
.article-item {
    width: 32%; /* 3列 (32% * 3 + 隙間2% * 2 = 100%) */
    margin-right: 2%;
    margin-bottom: 24px; /* 記事の下の間隔 */
}

/* 3. 3番目のブロックの右マージンを消す */
.article-item:nth-child(3n) {
    margin-right: 0;
}

/* 4. ブロック全体のリンク <a> タグ */
.article-item a {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}
.article-item a:hover {
    opacity: 0.7;
}

/* 5. サムネイルのコンテナ */
.article-item .article-thumbnail {
    width: 100%;
    height: 180px; 
    overflow: hidden;
    margin-bottom: 12px;
    background-color: #f0f0f0; 
}

/* 6. サムネイル画像 <img> タグ */
.article-item .article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像が歪まずコンテナを埋める */
    display: block;
}

/* 7. 記事・作品タイトル */
.article-item .article-title {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
    margin: 0;
}

/* =================================
   お問い合わせフォーム (#contact)
   ================================= */
#contact {
  margin-bottom: 120px;
}

#contact-form {
  max-width: 600px; /* フォームの最大幅 */
  margin: 0 auto; /* 中央寄せ */
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box; /* paddingを含めてwidth 100%にする */
  font-family: inherit;
  font-size: 16px;
}

.form-submit {
  text-align: center;
}

.form-submit button {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: var(--primary-color); /* variables.cssの色 */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.form-submit button:hover {
  opacity: 0.8;
}

/* 送信完了・エラーメッセージ */
.form-success {
  text-align: center;
  padding: 40px;
  border: 2px solid #4caf50;
  background: #f4fcf4;
}
.form-error {
  text-align: center;
  padding: 40px;
  border: 2px solid #f44336;
  background: #fef4f4;
}