/*
Theme Name: ITWard Corporate
Theme URI: https://www.itward.co.jp
Author: アイティワード株式会社
Author URI: https://www.itward.co.jp
Description: アイティワード株式会社のコーポレートサイト用カスタムテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: itward-corporate
*/

/* ========================================
   カラーパレット
======================================== */
:root {
  --primary-color: #1e3a8a;      /* 紺色(メイン) */
  --primary-light: #3b82f6;      /* 明るい紺 */
  --primary-dark: #1e40af;       /* 濃い紺 */
  --secondary-color: #64748b;     /* グレー */
  --accent-color: #f59e0b;        /* アクセント(オレンジ) */
  --text-color: #1f2937;          /* テキストカラー */
  --background-color: #ffffff;     /* 背景色 */
  --border-color: #e5e7eb;        /* ボーダー色 */
  --header-bg: #5278CC;           /* ヘッダー背景色 */
  --hero-bg: #0a0e27;             /* ヒーロー背景色（暗い紺） */
}

/* ========================================
   基本スタイル
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  font-size: 16px;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   ボタンスタイル
======================================== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: #ffffff;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-link {
  color: var(--primary-color);
  font-weight: 600;
}

/* ========================================
   ヘッダー
======================================== */
.site-header {
  background-color: var(--header-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo-area img {
  height: 50px;
  width: auto;
}

.main-navigation {
  display: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
}

.nav-menu li a {
  color: #ffffff;
  font-weight: 500;
  padding: 8px 0;
}

.nav-menu li a.cta-button {
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 5px;
}

/* ハンバーガーメニューボタン */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 12px;
  background-color: transparent;
  border: none;
  transition: all 0.3s ease;
}

.hamburger-menu:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ハンバーガーアイコンコンテナ */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  height: 20px;
  position: relative;
}

/* ハンバーガーライン */
.hamburger-line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: absolute;
  left: 0;
}

.hamburger-line:nth-child(1) {
  top: 0;
}

.hamburger-line:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
  bottom: 0;
}

/* ハンバーガーテキスト */
.hamburger-text {
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ハンバーガーメニューアクティブ時のアニメーション（×印に変形） */
.hamburger-menu.active .hamburger-line:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) scale(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* メニューオーバーレイ（背景暗転） */
.menu-overlay {
  display: none;
  position: fixed;
  top: 79px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-overlay.active {
  display: block;
  opacity: 1;
}

/* モバイルナビゲーション */
.main-navigation.active {
  display: block;
  position: fixed;
  top: 79px;
  left: 0;
  right: 0;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
  max-height: calc(100vh - 79px);
  overflow-y: auto;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-navigation.active .nav-menu {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.main-navigation.active .nav-menu li {
  border-bottom: 1px solid var(--border-color);
}

.main-navigation.active .nav-menu li a {
  display: block;
  padding: 15px 20px;
  color: var(--text-color);
}

.main-navigation.active .nav-menu li a:hover {
  background-color: #f9fafb;
}

.main-navigation.active .nav-menu li a.cta-button {
  margin: 10px 20px;
  text-align: center;
  background-color: var(--accent-color);
  color: #ffffff;
  border-radius: 5px;
}

/* ========================================
   フッター
======================================== */
.site-footer {
  background-color: var(--primary-dark);
  color: #ffffff;
  padding: 40px 0 20px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-company .company-info p {
  margin: 5px 0;
  font-size: 14px;
}

.footer-company .company-info .footer-company-name {
  font-size: 20px;
  font-weight: 700;
}

.footer-menu ul {
  list-style: none;
}

.footer-menu ul li {
  margin: 10px 0;
}

.footer-menu ul li a {
  color: #ffffff;
}

.footer-copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
}

/* ========================================
   ページヘッダー
======================================== */
.page-header {
  text-align: center;
  padding: 40px 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 40px;
}

.page-title {
  font-size: 32px;
  color: var(--primary-color);
  font-weight: 700;
}

.section-title {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--accent-color);
  font-weight: 700;
}

/* ========================================
   トップページ - ヒーローセクション
======================================== */
.hero-section {
  position: relative;
  background-color: var(--hero-bg);
  background-image:
    /* 横線 */
    linear-gradient(90deg, transparent 0%, transparent 48%, rgba(82, 120, 204, 0.3) 49%, rgba(82, 120, 204, 0.3) 51%, transparent 52%, transparent 100%),
    linear-gradient(90deg, transparent 0%, transparent 23%, rgba(59, 130, 246, 0.2) 24%, rgba(59, 130, 246, 0.2) 26%, transparent 27%, transparent 100%),
    /* 縦線 */
    linear-gradient(0deg, transparent 0%, transparent 48%, rgba(82, 120, 204, 0.2) 49%, rgba(82, 120, 204, 0.2) 51%, transparent 52%, transparent 100%),
    linear-gradient(0deg, transparent 0%, transparent 68%, rgba(59, 130, 246, 0.15) 69%, rgba(59, 130, 246, 0.15) 71%, transparent 72%, transparent 100%),
    /* 斜め線 */
    linear-gradient(45deg, transparent 0%, transparent 48%, rgba(82, 120, 204, 0.1) 49%, rgba(82, 120, 204, 0.1) 51%, transparent 52%, transparent 100%),
    /* 点（接続部分） */
    radial-gradient(circle at 20% 30%, rgba(82, 120, 204, 0.4) 0%, transparent 2%),
    radial-gradient(circle at 60% 70%, rgba(59, 130, 246, 0.3) 0%, transparent 1.5%),
    radial-gradient(circle at 80% 20%, rgba(82, 120, 204, 0.3) 0%, transparent 1.5%),
    radial-gradient(circle at 30% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 2%);
  background-size:
    100% 40px,
    100% 80px,
    60px 100%,
    120px 100%,
    200px 200px,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;
  padding: 80px 20px;
  text-align: left;
  color: #ffffff;
}

.hero-title {
  font-size: 28px;
  line-height: 1.5;
  margin-bottom: 0;
  font-weight: 700;
}

.hero-buttons {
  display: none;
}

/* ========================================
   サービスセクション
======================================== */
.services-section {
  padding: 60px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.service-card {
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.service-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.service-title {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.service-description {
  line-height: 1.8;
  margin-bottom: 15px;
}

.service-link {
  color: var(--accent-color);
  font-weight: 600;
}

/* ========================================
   ニュース＆ブログセクション
======================================== */
.news-blog-section {
  background-color: #f9fafb;
  padding: 60px 0;
}

.news-blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  padding: 20px;
  border-left: 4px solid var(--primary-color);
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.news-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-date {
  color: var(--secondary-color);
  font-size: 14px;
  font-weight: 500;
}

.news-title {
  font-size: 18px;
  margin-top: 10px;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.blog-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.blog-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-content {
  padding: 20px;
}

.blog-date {
  color: var(--secondary-color);
  font-size: 14px;
}

.blog-title {
  font-size: 18px;
  margin: 10px 0;
  line-height: 1.5;
}

.section-link {
  text-align: center;
  margin-top: 30px;
}

/* ========================================
   会社情報ページ
======================================== */
.greeting-section {
  margin-bottom: 60px;
}

.greeting-content p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.greeting-signature {
  text-align: right;
  margin-top: 30px;
  font-weight: 600;
}

.company-info-section {
  margin-bottom: 60px;
}

.company-info-table table {
  width: 100%;
  border-collapse: collapse;
}

.company-info-table th,
.company-info-table td {
  padding: 15px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.company-info-table th {
  background-color: #f9fafb;
  font-weight: 600;
  width: 30%;
}

.history-list dt {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.history-list dd {
  margin-bottom: 20px;
  padding-left: 20px;
}

/* ========================================
   サービスページ
======================================== */
.service-detail-section {
  margin-bottom: 60px;
}

.service-detail-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
}

.service-overview {
  line-height: 1.8;
  margin-bottom: 20px;
}

.service-link-button {
  text-align: center;
  margin: 30px 0;
}

.service-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.feature-item {
  padding: 20px;
  background-color: #f9fafb;
  border-radius: 8px;
}

.feature-title {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.feature-list {
  padding-left: 20px;
  line-height: 1.8;
}

/* ========================================
   採用情報ページ
======================================== */
.recruitment-flow-section {
  margin-bottom: 60px;
}

.flow-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.flow-step {
  padding: 30px;
  background-color: #f9fafb;
  border-radius: 10px;
  text-align: center;
}

.step-number {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 15px;
}

.step-title {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.job-listings {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.job-listing-item {
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 10px;
}

.job-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
}

.job-details {
  margin-bottom: 30px;
}

.job-detail {
  margin-bottom: 20px;
}

.job-detail h4 {
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-weight: 600;
}

.job-apply-button {
  text-align: center;
}

/* ========================================
   お問い合わせフォーム
======================================== */
.contact-intro {
  margin-bottom: 40px;
  line-height: 1.8;
  text-align: center;
}

.form-errors {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 30px;
}

.form-errors ul {
  margin-left: 20px;
  color: #991b1b;
}

.contact-form-section form {
  max-width: 800px;
  margin: 0 auto;
}

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

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

.required {
  color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 16px;
}

.form-group textarea {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.form-submit {
  text-align: center;
  margin-top: 40px;
}

.submit-button {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 15px 60px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-button:hover {
  background-color: var(--primary-dark);
}

/* ========================================
   プライバシーポリシーページ
======================================== */
.privacy-policy-content {
  max-width: 900px;
  margin: 0 auto;
}

.policy-intro {
  margin-bottom: 40px;
  line-height: 1.8;
}

.policy-section {
  margin-bottom: 40px;
}

.policy-section h2 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.policy-section ul {
  padding-left: 20px;
  line-height: 1.8;
}

.contact-info {
  margin-top: 15px;
  padding: 20px;
  background-color: #f9fafb;
  border-radius: 5px;
}

.policy-date {
  text-align: right;
  margin-top: 40px;
  font-weight: 600;
}

/* ========================================
   サンクスページ
======================================== */
.thanks-content {
  max-width: 800px;
  margin: 60px auto;
  text-align: center;
}

.thanks-title {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 30px;
  font-weight: 700;
}

.thanks-message {
  margin-bottom: 40px;
  line-height: 1.8;
}

.thanks-message p {
  margin-bottom: 20px;
}

/* ========================================
   ニュース・ブログアーカイブページ
======================================== */
.news-list-section,
.blog-grid-section {
  padding: 40px 0;
}

.news-list-item {
  padding: 30px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.news-list-item:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.news-excerpt,
.blog-excerpt {
  margin-top: 15px;
  line-height: 1.8;
  color: var(--secondary-color);
}

.read-more {
  display: inline-block;
  margin-top: 15px;
  color: var(--accent-color);
  font-weight: 600;
}

.pagination {
  text-align: center;
  margin-top: 50px;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--primary-color);
}

.pagination .current {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* ========================================
   記事詳細ページ
======================================== */
.article-header {
  margin-bottom: 40px;
}

.article-date {
  color: var(--secondary-color);
  font-size: 14px;
  font-weight: 500;
}

.article-title {
  font-size: 32px;
  color: var(--primary-color);
  margin-top: 10px;
  line-height: 1.4;
  font-weight: 700;
}

.article-thumbnail {
  margin-bottom: 40px;
}

.article-thumbnail img {
  width: 100%;
  border-radius: 10px;
}

.article-content {
  line-height: 1.8;
  margin-bottom: 60px;
}

.article-content h2 {
  font-size: 26px;
  margin: 40px 0 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.article-content h3 {
  font-size: 22px;
  margin: 30px 0 15px;
  color: var(--primary-color);
  font-weight: 600;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  padding: 30px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
  gap: 20px;
}

.nav-previous,
.nav-next {
  flex: 1;
}

.nav-next {
  text-align: right;
}

.back-to-archive {
  text-align: center;
  padding: 20px 0;
}

.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: var(--secondary-color);
  font-size: 18px;
}

/* ========================================
   レスポンシブブレイクポイント
======================================== */
/* モバイル: ~767px (デフォルト) */

/* タブレット: 768px~1023px */
@media (min-width: 768px) {
  .main-navigation {
    display: block;
  }

  .hamburger-menu {
    display: none;
  }

  .hero-title {
    font-size: 36px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .company-info-table th {
    width: 25%;
  }
}

/* デスクトップ: 1024px~ */
@media (min-width: 1024px) {
  .hero-title {
    font-size: 42px;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .flow-steps {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ========================================
   エラーページスタイル
======================================== */
.error-page {
  padding: 60px 0;
  min-height: 60vh;
}

.error-page .page-header {
  text-align: center;
  margin-bottom: 40px;
}

.error-page .page-title {
  font-size: 32px;
  color: var(--text-color);
  margin-bottom: 10px;
}

/* エラーメッセージボックス */
.error-message-box {
  background-color: #fee;
  border: 2px solid #fcc;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
}

.error-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.error-title {
  font-size: 24px;
  color: #d00;
  margin-bottom: 20px;
}

.error-details {
  background-color: #fff;
  border: 1px solid #fcc;
  border-radius: 4px;
  padding: 20px;
  margin-top: 20px;
  text-align: left;
}

.error-details h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #d00;
}

.error-details p {
  color: var(--text-color);
  line-height: 1.6;
}

/* エラーログセクション */
.error-log-section {
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.error-log-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text-color);
}

.error-log-container {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 15px;
  border-radius: 4px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

.error-log-entry {
  padding: 5px 0;
  border-bottom: 1px solid #333;
}

.error-log-entry:last-child {
  border-bottom: none;
}

.log-timestamp {
  color: #6a9955;
  margin-right: 10px;
}

.log-message {
  color: #ce9178;
}

/* 対処方法セクション */
.error-help-section {
  background-color: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
}

.error-help-section h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.error-help-list {
  list-style-position: inside;
  padding-left: 10px;
}

.error-help-list li {
  margin-bottom: 10px;
  color: var(--text-color);
  line-height: 1.8;
}

.error-help-list a {
  color: var(--primary-color);
  text-decoration: underline;
}

.error-help-list a:hover {
  color: var(--primary-light);
}

/* エラーページのアクションボタン */
.error-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-actions .btn-primary,
.error-actions .btn-secondary {
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .error-page .page-title {
    font-size: 24px;
  }

  .error-title {
    font-size: 20px;
  }

  .error-icon {
    font-size: 48px;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-actions .btn-primary,
  .error-actions .btn-secondary {
    width: 100%;
  }
}

/* ========================================
   アクセシビリティ対応
======================================== */

/* スキップリンク */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 8px 15px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 0 0 5px 0;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* 強化されたフォーカスインジケーター */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ハンバーガーメニューのフォーカス */
.hamburger-menu:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
}

/* フォームのフォーカス状態 */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 必須フィールドのaria-label対応 */
.required[aria-label] {
  speak: literal-punctuation;
}

/* エラーメッセージのアクセシビリティ */
[role="alert"] {
  padding: 15px;
  border-radius: 5px;
}

/* チェックボックスのフォーカス */
input[type="checkbox"]:focus {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
}

/* ========================================
   ローディングインジケーター
   ======================================== */

/* スピナーアニメーション（回転する円） */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* ローディング中のテキスト */
.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ボタン無効化時のスタイル */
.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ボタン内のテキスト切り替え */
.submit-button .btn-text,
.submit-button .btn-loading {
  transition: opacity 0.2s ease;
}

/* ========================================
   ファイルアップロードプレビュー
   ======================================== */

/* ファイルプレビューコンテナ */
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ファイル情報エリア */
.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0; /* テキストの切り詰めを有効化 */
}

/* ファイルアイコン */
.file-icon {
  flex-shrink: 0;
  color: var(--primary-color);
}

/* ファイル名 */
.file-name {
  font-weight: 500;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* ファイルサイズ */
.file-size {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--secondary-color);
  margin-left: 8px;
}

/* 削除ボタン */
.file-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  border-radius: 4px;
  color: #dc3545;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-remove:hover {
  background-color: #fee;
  color: #c82333;
}

.file-remove:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
  .file-preview {
    padding: 10px 12px;
  }

  .file-info {
    gap: 8px;
  }

  .file-name {
    font-size: 14px;
  }

  .file-size {
    font-size: 12px;
  }

  .file-remove {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }
}

/* ========================================
   パンくずリスト
   ======================================== */

/* パンくずリストコンテナ */
.breadcrumb {
  background-color: #f8f9fa;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

/* パンくずリスト */
.breadcrumb-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* パンくずリスト項目 */
.breadcrumb-item {
  display: flex;
  align-items: center;
}

/* 区切り文字（矢印）を追加 */
.breadcrumb-item:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: #999;
  font-size: 16px;
  line-height: 1;
}

/* パンくずリンク */
.breadcrumb-item a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 現在のページ */
.breadcrumb-item--current span {
  color: #333;
  font-weight: 500;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .breadcrumb {
    padding: 10px 0;
  }

  .breadcrumb-list {
    padding: 0 16px;
    font-size: 13px;
    gap: 6px;
  }

  .breadcrumb-item:not(:last-child)::after {
    margin-left: 6px;
    font-size: 14px;
  }

  /* モバイルでは中間階層を省略 */
  .breadcrumb-item:not(:first-child):not(:last-child):not(:nth-last-child(2)) {
    display: none;
  }

  /* 省略記号を表示 */
  .breadcrumb-item:nth-child(2)::before {
    content: '...';
    margin-right: 6px;
    color: #999;
  }
}

/* ========================================
   トースト通知システム
   ======================================== */

/* トースト通知コンテナ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* トースト通知 */
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 320px;
  max-width: 500px;
  padding: 16px 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out;
  transition: all 0.3s ease;
}

/* スライドインアニメーション */
@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* フェードアウトアニメーション */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

.toast.hiding {
  animation: fadeOut 0.3s ease-out forwards;
}

/* 成功トースト */
.toast-success {
  border-left: 4px solid #22c55e;
}

.toast-success .toast-icon {
  color: #22c55e;
}

/* エラートースト */
.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
}

/* 警告トースト */
.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

/* 情報トースト */
.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

/* トースト内容エリア */
.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* トーストアイコン */
.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

/* トーストメッセージ */
.toast-message {
  color: var(--text-color);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
}

/* 閉じるボタン */
.toast-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background-color: #f3f4f6;
  color: #6b7280;
}

.toast-close:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: auto;
    width: 100%;
    padding: 14px 16px;
  }

  .toast-message {
    font-size: 14px;
  }

  .toast-icon {
    font-size: 20px;
  }

  @keyframes slideInRight {
    from {
      transform: translateY(-100px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes fadeOut {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-100px);
    }
  }
}

/* ========================================
   フォームエラー表示
   ======================================== */

/* エラーのある入力フィールド */
.form-group.has-error input[type="text"],
.form-group.has-error input[type="email"],
.form-group.has-error input[type="tel"],
.form-group.has-error textarea,
.form-group.has-error select {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-group.has-error input:focus,
.form-group.has-error textarea:focus,
.form-group.has-error select:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* 正常な入力フィールド（バリデーション通過後） */
.form-group.has-success input[type="text"],
.form-group.has-success input[type="email"],
.form-group.has-success input[type="tel"],
.form-group.has-success textarea,
.form-group.has-success select {
  border-color: #22c55e;
  background-color: #f0fdf4;
}

/* エラーメッセージ */
.error-message {
  display: none;
  color: #dc2626;
  font-size: 14px;
  margin-top: 6px;
  padding: 8px 12px;
  background-color: #fef2f2;
  border-left: 3px solid #ef4444;
  border-radius: 4px;
  animation: slideDown 0.3s ease-out;
}

.form-group.has-error .error-message {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* エラーアイコン */
.error-message::before {
  content: '✕';
  color: #ef4444;
  font-weight: bold;
  flex-shrink: 0;
}

/* 成功メッセージ */
.success-message {
  display: none;
  color: #16a34a;
  font-size: 14px;
  margin-top: 6px;
  padding: 8px 12px;
  background-color: #f0fdf4;
  border-left: 3px solid #22c55e;
  border-radius: 4px;
}

.form-group.has-success .success-message {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 成功アイコン */
.success-message::before {
  content: '✓';
  color: #22c55e;
  font-weight: bold;
  flex-shrink: 0;
}

/* ラベルのエラー状態 */
.form-group.has-error label {
  color: #dc2626;
}

/* フォーム全体のエラーサマリー */
.form-error-summary {
  display: none;
  background-color: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  animation: slideDown 0.3s ease-out;
}

.form-error-summary.visible {
  display: block;
}

.form-error-summary-title {
  color: #dc2626;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-error-summary-title::before {
  content: '⚠';
  font-size: 24px;
}

.form-error-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.form-error-summary-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: #991b1b;
}

.form-error-summary-list li::before {
  content: '•';
  position: absolute;
  left: 8px;
  font-weight: bold;
}

.form-error-summary-list a {
  color: #dc2626;
  text-decoration: underline;
  cursor: pointer;
}

.form-error-summary-list a:hover {
  color: #991b1b;
}

/* チェックボックスのエラー */
.form-group.has-error .checkbox-label {
  color: #dc2626;
}

.form-group.has-error input[type="checkbox"] {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

/* リアルタイムバリデーション中の表示 */
.form-group.validating input,
.form-group.validating textarea {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* スライドダウンアニメーション */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .error-message,
  .success-message {
    font-size: 13px;
    padding: 6px 10px;
  }

  .form-error-summary {
    padding: 16px;
  }

  .form-error-summary-title {
    font-size: 16px;
  }
}

/* ========================================
   タップターゲットサイズの改善
   ======================================== */

/* WCAG 2.1 Level AAガイドラインに準拠した最小タップサイズ（44×44px） */

/* ボタン要素の最小タップサイズ確保 */
.btn,
.submit-button,
button:not(.toast-close):not(.file-remove) {
  min-height: 44px;
  min-width: 44px;
  padding: 12px 30px;
}

/* ナビゲーションリンクのタップ領域拡大 */
.nav-menu li a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 12px 16px;
}

/* モバイルナビゲーションのタップ領域 */
.main-navigation.active .nav-menu li a {
  min-height: 48px;
  padding: 16px 20px;
}

/* ハンバーガーメニューボタンのタップ領域 */
.hamburger-menu {
  min-width: 48px;
  min-height: 48px;
  padding: 12px;
}

/* チェックボックスとラジオボタンのタップ領域拡大 */
.checkbox-label {
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
  min-width: 24px;
  min-height: 24px;
  cursor: pointer;
}

/* ファイル削除ボタンのタップ領域 */
.file-remove {
  min-width: 44px;
  min-height: 44px;
}

/* トースト閉じるボタンのタップ領域 */
.toast-close {
  min-width: 44px;
  min-height: 44px;
}

/* リンクカードのタップ領域 */
.service-card,
.blog-card,
.news-item {
  position: relative;
}

.service-card a,
.blog-card a,
.news-item a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* パンくずリストのタップ領域 */
.breadcrumb-item a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 4px;
}

/* フッターリンクのタップ領域 */
.footer-menu ul li a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
}

/* ページネーションのタップ領域 */
.pagination a,
.pagination span {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
}

/* ポストナビゲーションのタップ領域 */
.post-navigation a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 12px 0;
}

/* CTAボタンの拡大 */
.nav-menu li a.cta-button {
  min-height: 44px;
  padding: 12px 24px;
}

/* エラーページのアクションボタン */
.error-actions .btn-primary,
.error-actions .btn-secondary {
  min-height: 48px;
  padding: 14px 32px;
}

/* フォーム送信ボタンの拡大（モバイル） */
@media screen and (max-width: 768px) {
  .submit-button {
    min-height: 48px;
    width: 100%;
    padding: 16px 40px;
  }

  /* モバイルでのボタン全般 */
  .btn {
    min-height: 48px;
    padding: 14px 28px;
  }

  /* ナビゲーションアイテムの間隔を広く */
  .main-navigation.active .nav-menu li a {
    min-height: 52px;
    padding: 18px 20px;
  }

  /* チェックボックスラベルの間隔 */
  .checkbox-label {
    min-height: 48px;
    padding: 12px 0;
  }

  .checkbox-label input[type="checkbox"],
  .checkbox-label input[type="radio"] {
    min-width: 28px;
    min-height: 28px;
  }
}