html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-overflow-scrolling: touch; /* iOSでのスムーススクロール */
}

/*
Theme Name: OKMarket., Ltd.
Description: Material 3 Expressive + Hamburger Menu Theme
Version: 1.0
*/

:root {
  --md-color-primary: #6750A4;
  --md-color-on-primary: #FFFFFF;
  --md-color-background: #FFFFFF;
  --md-color-surface: #FFFFFF;
  --md-color-on-surface: #1c1b1f;
  --md-color-outline: #7a7289;
  --md-elevation-2: 0 3px 6px rgba(0,0,0,0.11);
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: var(--md-color-background);
  color: var(--md-color-on-surface);
  transition: background-color 0.5s, color 0.5s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 80px; /* 固定ヘッダーの高さ分のパディング */
}

/* h1のスタイル設定 */
h1 {
  font-size: clamp(2.5rem, 4vw, 3rem);
  font-weight: bold;
  line-height: 1.4;
  margin: 0 0 1rem 0;
  letter-spacing: 0.05em;
  word-spacing: 0.1em;
  text-align: left;
  color: var(--md-color-on-surface);
}

/* h1の改行部分の調整 */
h1 br {
  display: block;
  content: "";
  margin-top: 0.5em;
}

/* モバイル対応 */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(2.5rem, 5vw, 3rem);
    line-height: 1.3;
    letter-spacing: 0.03em;
  }
  
  h1 br {
    margin-top: 0.3em;
  }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
  h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1.35;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  height: 80px;
  color: var(--md-color-on-primary);
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease-in-out;
}

/* ヘッダー非表示時のスタイル */
.site-header.header-hidden {
  transform: translateY(-100%);
}

/* ヘッダー表示時のスタイル */
.site-header:not(.header-hidden) {
  transform: translateY(0);
}

.site-header .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
  max-width: 100vw;
  width: 100%;
  padding: 0 1rem;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1;
  text-align: left;
}

.site-title a {
  color: var(--md-color-on-surface);
  text-decoration: none;
}

.header-nav {
  margin-left: auto !important;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .header-nav {
    position: relative;
    z-index: 2001;
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 32px;
  color: var(--md-color-on-surface);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    position: relative;
    z-index: 2001;
  }
}

/* ハンバーガーメニューの全画面表示 */
.main-menu {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* SP表示時のハンバーガーメニュー */
@media (max-width: 768px) {
  .main-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 999999 !important;
    padding: 2rem;
    box-sizing: border-box;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  }

  .main-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-menu li {
    margin: 0;
    list-style: none;
    width: 100%;
    text-align: center;
  }

  .main-menu li a {
    color: #000000 !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 2rem;
    line-height: 1.2;
    transition: color 0.3s ease;
    display: block;
    padding: 1rem 2rem;
    white-space: nowrap;
  }

  .main-menu li a:hover {
    color: var(--md-color-primary) !important;
  }

  /* Closeボタンは削除されたため、このセクションを削除 */

  /* ハンバーガーボタンをメニュー表示時に非表示 */
  .hamburger {
    z-index: 1000000 !important;
  }

  .main-menu.active ~ .header-nav .hamburger,
  .main-menu.active + .header-nav .hamburger {
    display: none !important;
  }

  /* メニュー内のハンバーガーボタンを非表示 */
  .main-menu.active .hamburger {
    display: none !important;
  }

  /* Closeアイコンを完全に非表示 */
  .material-icons:contains('close'),
  .hamburger .material-icons[textContent='close'] {
    display: none !important;
  }

  /* CTAボタン */
  .menu-cta-item {
    margin-top: 3rem;
    width: 100%;
    text-align: center;
  }

  .menu-cta button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 3rem;
    border: 1px solid #000000 !important;
    border-radius: 24px;
    color: #000000 !important;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: bold;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    min-height: 4rem;
    min-width: 200px;
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
  }

  .menu-cta button:hover {
    background: #000000;
    color: #ffffff !important;
  }

  /* メニューオーバーレイ */
  .menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.3) !important;
    z-index: 999998 !important;
    display: none;
    cursor: pointer;
  }

  .menu-overlay.active {
    display: block !important;
  }

  /* ヘッダーのz-index調整 */
  .site-header {
    z-index: 1000001 !important;
  }
}

.main-menu li a {
  color: var(--md-color-on-surface);
  text-decoration: none;
  font-weight: normal;
  border-bottom: none;
  transition: border-bottom 0.2s;
}

.main-menu li a:hover {
  border-bottom: 2px solid var(--md-color-on-primary);
}

.main-menu li.current-menu-item a,
.main-menu li.current_page_item a {
  border-bottom: none;
}

.site-footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1.5rem 0 1.5rem;
  position: relative;
  z-index: 9999;
  margin: 0;
  display: block;
  visibility: visible;
  opacity: 1;
}

.site-footer p {
  color: #fff;
  font-size: 1rem;
  display: block;
  visibility: visible;
  opacity: 1;
  margin: 0;
  padding: 0;
}

/* フッター内のコンテナも確実に表示 */
.site-footer .container {
  color: #fff;
  display: block;
  visibility: visible;
  opacity: 1;
}

/* フッターが確実に表示されるように */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-footer {
  flex-shrink: 0;
}

.header-cta {
  display: inline-block;
  margin-left: 2rem;
  padding: 0.6em 1.5em;
  background: var(--md-color-outline);
  color: var(--md-color-on-primary);
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
  border: none;
  font-size: 1rem;
  line-height: 1.2;
}
.header-cta:hover {
  background: var(--md-color-on-primary);
  color: var(--md-color-primary);
}

/* ===== モバイル対応 ===== */
@media (max-width: 768px) {
  .hamburger {
    display: block !important;
    z-index: 10000;
  }
  .main-menu {
    display: none;
    position: absolute;
    top: 80px;
    right: 0;
    flex-direction: column;
    background: var(--md-color-primary);
    padding: 1rem;
    width: 200px;
    box-shadow: var(--md-elevation-2);
    gap: 1.5rem;
    z-index: 9999;
  }
  .main-menu.active {
    display: flex;
  }
  body.menu-open {
    overflow: hidden;
  }
  .header-cta {
    margin-left: 1rem;
    padding: 0.6em 1em;
    font-size: 0.95rem;
  }
}

/* PC表示時のヘッダーCTAボタンを表示 */
@media (min-width: 769px) {
  .header-cta {
    display: inline-block !important;
  }
  .menu-cta-item {
    display: none !important;
  }
}

html {
  scroll-behavior: smooth;
}

/* ===== パララックス効果 ===== */
.parallax-image {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  transform: translateY(0);
  transition: transform 0.5s ease-out; /* トランジション時間を延長 */
}

@media (max-width: 768px) {
  .parallax-image {
    height: 300px;
  }
}

/* ===== ページ全体グリッドレイアウト ===== */
.main-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  background-color: #fff;
  transition: background-color 0.3s ease-in-out;
}

body.dark-bg .main-grid {
  background-color: #000;
  transition: background-color 0.3s ease-in-out;
}

/* contactセクション直上の.main-gridの背景色を#000に統一 */
body.dark-bg .main-grid,
#contact + .main-grid,
.main-grid:has(+ #contact) {
  background-color: #000;
}

.main-grid__item {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .main-grid__item {
    grid-column: 1 / -1;
  }
}

/* ===== HEROセクションのレイアウト ===== */
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 60vh;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 1rem;
}

.hero-text h1 {
  margin: 0 0 1rem 4rem;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 1rem;
}

.hero-img {
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: transform 0.3s ease-in-out;
}

.hero-img:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: auto;
  }
  
  .hero-text {
    order: 1;
    padding-right: 0;
  }
  
  .hero-text h1 {
    margin: 0 0 1rem 0;
  }
  
  .hero-image {
    order: 2;
    padding-left: 0;
  }
  
  .hero-img {
    max-width: 100%;
  }
}

/* ===== aboutセクションのPHILOSOPHYテキスト ===== */
.about-philosophy {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: var(--md-color-primary, #6750A4);
  margin-bottom: 0.5rem;
}

/* ===== aboutセクションのグリッド分割 ===== */
.about-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  align-items: center;
  scroll-margin-top: 100px; /* ヘッダー分のマージン */
  position: relative;
  z-index: 10; /* 他の要素より前面に表示 */
}

#about-text {
  scroll-margin-top: 100px; /* ヘッダー分のマージン */
  position: relative;
  z-index: 10; /* 他の要素より前面に表示 */
}

/* aboutセクション全体の調整 */
#about {
  scroll-margin-top: 100px;
}
.about-col-left {
  grid-column: 1 / span 6;
}
.about-col-right {
  grid-column: 7 / span 6;
}
@media (max-width: 768px) {
  .about-container {
    grid-template-columns: 1fr;
  }
  .about-col-left,
  .about-col-right {
    grid-column: 1 / -1;
  }
}

.about-col-right h2 {
  font-size: 2.5rem;
}

@media (max-width: 768px) {
  .about-col-right h2 {
    font-size: 1.8rem;
  }
}

/* ===== serviceセクションのグリッド分割 ===== */
.service-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  align-items: end;
}
.service-col-left {
  grid-column: 1 / span 9;
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  color: var(--md-color-primary, #6750A4);
  line-height: 1;
}
.service-col-right {
  grid-column: 10 / span 3;
  font-size: 2rem;
  font-weight: bold;
  color: var(--md-color-on-surface, #1c1b1f);
  line-height: 1.2;
  align-self: end;
}
.service-desc-full {
  grid-column: 1 / -1;
  margin-top: 1rem;
}
@media (max-width: 768px) {
  .service-container {
    grid-template-columns: 1fr;
  }
  .service-col-left,
  .service-col-right,
  .service-desc-full {
    grid-column: 1 / -1;
  }
  .service-col-left {
    font-size: 2rem;
  }
  .service-col-right {
    font-size: 1.3rem;
  }
}

.service-business {
  font-size: 7rem;
}

.service-list {
  list-style: none;
  margin: 2rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  grid-column: 7 / span 6;
  justify-self: end;
}

@media (max-width: 768px) {
  .service-list {
    grid-column: 1 / -1;
    justify-self: center;
    align-items: center;
  }
}
.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid #3e3e3e;
  border-bottom: 1px solid #3e3e3e;
}
.service-list-num {
  font-size: 1rem;
  font-weight: bold;
  color: var(--md-color-primary, #6750A4);
  margin-top: 0.3em;
  flex-shrink: 0;
}
.service-list-content {
  display: flex;
  flex-direction: column;
}
.service-list-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--md-color-on-surface, #1c1b1f);
  line-height: 1.2;
}
.service-list-en {
  font-size: 1rem;
  color: #888;
  margin-top: 0.2em;
  letter-spacing: 0.05em;
}
@media (max-width: 768px) {
  .service-business {
    font-size: 3rem;
  }
  .service-list-title {
    font-size: 1.3rem;
  }
}

/* ===== service-list-areaとプレビュー・モーダル ===== */
.service-list-area {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.service-list-preview {
  position: relative;
  grid-column: 1 / span 6;
  background: #f7f7f7;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 300px;
  padding: 0;
  overflow: hidden;
}
.service-list-preview .preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.service-list-preview .preview-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0.2) 100%, rgba(0,0,0,0) 100%);
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  box-sizing: border-box;
  pointer-events: none;
}

/* モーダル */
.service-modal {
  display: flex;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0);
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}
.service-modal.active {
  background: rgba(0,0,0,0.6);
  opacity: 1;
  visibility: visible;
}
.service-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  max-width: 90vw;
  width: 100%;
  max-height: 80vh;
  text-align: center;
  position: relative;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.service-modal.active .service-modal-content {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.1s; /* 背景アニメーションより少し遅れて開始 */
}
.service-modal-close {
  position: absolute;
  right: 1rem; top: 1rem;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
}
.modal-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin-bottom: 1rem;
}
.modal-text {
  font-size: 1.1rem;
  color: #333;
}
@media (max-width: 768px) {
  .service-list-area {
    grid-template-columns: 1fr;
  }
  .service-list-preview {
    display: none;
  }
  .service-list {
    grid-column: 1 / -1;
  }
  .service-modal {
    display: none;
  }
  .service-modal.active {
    display: flex;
  }
}
@media (min-width: 769px) {
  .service-modal { display: none !important; }
}

section {
  padding-bottom: 15rem;
}

/* ===== NEWSセクション ===== */
#news h2 {
  font-size: 9rem;
  color: var(--md-color-primary, #6750A4);
  font-weight: bold;
  line-height: 1;
}

.news-list-grid {
  grid-column: 5 / span 8;
  justify-self: start;
  margin-left: calc(4 * (100% / 12));
}

a:-webkit-any-link {
  text-decoration: none;
}

.news-list a {
  transition: filter 0.3s ease;
}

.news-list a:hover {
  filter: invert(100%);
}

.news-list li {
  padding-block: 2rem;
  list-style: none;
  border-bottom: 1px solid var(--md-color-outline, #7a7289);
}

.news-date {
  font-size: 0.75rem;
  color: var(--md-color-outline, #7a7289);
  border-bottom: none;
}

.news-title {
  font-size: 1rem;
  color: var(--md-color-on-surface, #1c1b1f);
}

@media (max-width: 768px) {
  #news h2 {
    font-size: 4rem;
  }
  .news-list-grid {
    grid-column: 1 / -1;
    margin-left: 0;
  }
}
  
/* ===== フェードインアニメーション ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.animate {
  opacity: 1;
  transform: translateY(0);
}

/* container p要素のフェードイン */
.container p {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.container p.animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 背景色切り替え ===== */
body.dark-bg {
  background: linear-gradient(to bottom, #000 0%, #000 100%);
  color: #fff;
}

/* グラデーション背景のオーバーレイ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #fff 0%, #fff 100%);
  transition: all 0.8s ease-in-out;
  pointer-events: none;
  z-index: -1;
}

body.dark-bg::before {
  background: linear-gradient(to bottom, #000 0%, #000 100%);
}

body.dark-bg .md-card {
  background-color: transparent;
  color: #fff;
  transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out;
}

body.dark-bg h1,
body.dark-bg h2,
body.dark-bg h3,
body.dark-bg p,
body.dark-bg span,
body.dark-bg a {
  color: #fff;
  transition: color 0.8s ease-in-out;
}

/* companyセクションの特別なスタイル - グラデーションでスムーズに */
#company {
  background: linear-gradient(to bottom, #fff 0%, #fff 100%);
  color: #000;
  position: relative;
  transition: all 0.8s ease-in-out;
}

#company::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #fff 0%, #fff 100%);
  transition: all 0.8s ease-in-out;
  z-index: -1;
}

#company h2,
#company p {
  color: #000;
  transition: color 0.8s ease-in-out;
}

/* 背景色切り替え後のcompanyセクション - グラデーションでスムーズに */
body.dark-bg #company {
  background: linear-gradient(to bottom, #000 0%, #000 100%);
  color: #fff;
}

body.dark-bg #company::before {
  background: linear-gradient(to bottom, #000 0%, #000 100%);
}

body.dark-bg #company h2,
body.dark-bg #company p {
  color: #fff;
}
  
/* ===== companyセクション ===== */
.company-table-container {
  grid-column: 5 / -1;
  margin-left: calc(4 * (100% / 12));
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid #dedede;
  table-layout: fixed;
}

.company-table tbody {
  display: table-row-group;
}

.company-table tr {
  height: 6rem;
  display: table-row;
}

.company-table th,
.company-table td {
  text-align: left;
  border-bottom: 1px solid #dedede;
  padding: 2.25rem 2.5rem 2.25rem 1.25rem;
  vertical-align: middle;
  box-sizing: border-box;
}

.company-table th {
  font-weight: bold;
  width: 13rem;
}

.company-table td {
  width: calc(100% - 13rem);
}

#company h2 {
  margin-bottom: 5rem;
  font-size: 3rem;
}

@media (max-width: 768px) {
  .company-table-container {
    grid-column: 1 / -1;
    margin-left: 0;
  }
  .company-table tbody {
    font-size: 14px;
  }
  .company-table th {
    padding-left: 0;
  }
  .company-table th,
  .company-table td {
    padding: 1rem .75rem;
  }
  .company-table tr {
    flex-direction: column;
  }
  .company-table th,
  .company-table td {
    width: 100%;
  }
}
  
/* contactセクションの背景色切り替え - 固定背景色 */
#contact {
  background: #000;
  color: #fff;
  position: relative;
}

#contact h2,
#contact p,
#contact a {
  color: #fff;
}
  
/* 背景色切り替え時のヘッダー背景 */
body.dark-bg .site-header {
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
}

body.dark-bg .site-header .site-title a {
  color: #fff;
}

body.dark-bg .site-header .main-menu li a {
  color: #fff;
}

body.dark-bg .site-header .hamburger {
  color: #fff;
}

/* ===== Contact Form 7 スタイル ===== */
.contact-form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Contact Form 7の基本スタイル */
.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wpcf7-form p {
  margin: 0;
}

.wpcf7-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--md-color-on-surface);
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--md-color-outline);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--md-color-surface);
  color: var(--md-color-on-surface);
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--md-color-primary);
}

.wpcf7-form textarea {
  min-height: 120px;
  resize: vertical;
}

.wpcf7-form input[type="submit"] {
  background: var(--md-color-primary);
  color: var(--md-color-on-primary);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.wpcf7-form input[type="submit"]:hover {
  background: var(--md-color-on-primary);
  color: var(--md-color-primary);
}

/* 必須項目のマーク */
.wpcf7-form .wpcf7-form-control-wrap .wpcf7-not-valid-tip {
  color: #d32f2f;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.wpcf7-form .wpcf7-response-output {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-weight: bold;
}

.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
  background: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #4caf50;
}

.wpcf7-form .wpcf7-response-output.wpcf7-validation-errors {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #f44336;
}

.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #f44336;
}

/* スピナー */
.wpcf7-form .wpcf7-spinner {
  margin-left: 0.5rem;
}

/* ダークモード対応 */
body.dark-bg .wpcf7-form label {
  color: #fff;
}

body.dark-bg .wpcf7-form input[type="text"],
body.dark-bg .wpcf7-form input[type="email"],
body.dark-bg .wpcf7-form input[type="tel"],
body.dark-bg .wpcf7-form textarea {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

body.dark-bg .wpcf7-form input[type="text"]:focus,
body.dark-bg .wpcf7-form input[type="email"]:focus,
body.dark-bg .wpcf7-form input[type="tel"]:focus,
body.dark-bg .wpcf7-form textarea:focus {
  border-color: var(--md-color-primary);
}

/* contactセクション内のフォームは常に黒背景を維持 */
#contact .wpcf7-form label {
  color: #fff;
}

#contact .wpcf7-form input[type="text"],
#contact .wpcf7-form input[type="email"],
#contact .wpcf7-form input[type="tel"],
#contact .wpcf7-form textarea {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

#contact .wpcf7-form input[type="text"]:focus,
#contact .wpcf7-form input[type="email"]:focus,
#contact .wpcf7-form input[type="tel"]:focus,
#contact .wpcf7-form textarea:focus {
  border-color: var(--md-color-primary);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .contact-form-container {
    padding: 1rem 0;
  }
  
  .wpcf7-form {
    gap: 1rem;
  }
  
  .wpcf7-form input[type="submit"] {
    width: 100%;
    align-self: stretch;
  }
}

/* ===== contactセクションのスタイル ===== */
#contact h2 {
  text-align: center;
  font-size: 3rem;
}
  