/* ====================================
   カスタムスタイル - Figmaデザインに基づく
==================================== */

/* ====================================
   ヘッダーカスタマイズ
==================================== */
.main-navigation a:hover,
.main-navigation a.active {
    color: var(--color-primary) !important;
}

.main-navigation .btn:hover {
    color: #fff !important;
    background-color: var(--color-primary);
}

/* ====================================
   フッターカスタマイズ
==================================== */
.footer-navigation nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-2xl);
}

/* ====================================
   背景画像 - body全体に適用
==================================== */
body {
    background-image: url('../images/corporate-hero.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ====================================
   トップページ以外のコンテンツ背景
==================================== */
body:not(.home) .site-main {
    background-color: #fff;
    min-height: calc(100vh - 80px);
    margin-top: 144px; /* ヘッダーの高さ分の余白 */
    padding-top: 60px;
    padding-bottom: 60px;
}

/* ====================================
   ヒーローセクション
==================================== */
.hero-section {
    position: relative;
    height: 880px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: visible;
}

/* 背景画像の上にオーバーレイを追加（オプション：テキストの視認性向上） */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 120px;
    margin-top: 120px;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: var(--spacing-2xl);
    color: var(--color-text-primary);
}

.hero-description {
    font-size: var(--font-size-base);
    line-height: 2.5;
    color: var(--color-text-primary);
}

.scroll-indicator {
    position: absolute;
    right: 78px;
    top: 624px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.scroll-text {
    font-family: var(--font-primary);
    font-size: var(--font-size-xs);
    line-height: 2.5;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--color-text-primary);
}

.scroll-line {
    position: relative;
    width: 2px;
    height: 64px;
}

.scroll-line-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-border);
}

.scroll-line-active {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 16px;
    background-color: var(--color-primary);
    animation: scrollAnimation 2s ease-in-out infinite;
}

@keyframes scrollAnimation {
    0%, 100% {
        height: 16px;
        bottom: 0;
    }
    50% {
        height: 32px;
        bottom: 16px;
    }
}

/* ====================================
   ミッションセクション
==================================== */
.mission-section {
    padding: var(--spacing-4xl) 0;
    background-color: transparent;
}

.mission-section .container {
    max-width: 1040px;
    padding: 0 200px;
}

.mission-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: var(--spacing-2xl);
    color: var(--color-text-primary);
}

.mission-description {
    font-size: var(--font-size-base);
    line-height: 2.5;
    color: var(--color-text-primary);
    max-width: 800px;
}

/* ====================================
   Aboutセクション
==================================== */
.about-section {
    padding: var(--spacing-4xl) 0;
    background-color: transparent;
}

.about-container {
    display: flex;
    gap: 80px;
    align-items: center;
    padding: 0 124px 0 0;
}

.about-image {
    width: 720px;
    height: 494px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: var(--color-background);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.section-header-center {
    align-items: center;
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-label {
    font-family: var(--font-secondary);
    font-size: var(--font-size-base);
    font-weight: 500;
    margin-bottom: 0;
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: var(--color-text-primary);
}

/* Aboutセクション、採用セクション、お問い合わせセクションは左寄せ */
.about-section .section-header,
.career-box .section-header,
.contact-box .section-header {
    align-items: flex-start;
    text-align: left;
}

.about-section .section-title,
.career-box .section-title,
.contact-box .section-title {
    text-align: left;
}

.about-description {
    font-size: var(--font-size-base);
    line-height: 2.5;
    color: var(--color-text-primary);
}

/* ====================================
   サービスセクション
==================================== */
.services-section {
    padding: var(--spacing-4xl) 164px;
    background-color: transparent;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.service-item {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.service-logo {
    width: 379px;
    height: 248px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.service-logo img {
    max-width: 100%;
    height: auto;
}

.service-logo-dark {
    background-color: var(--color-surface);
}

.service-logo-blue {
    background-color: var(--color-primary);
}

.service-logo-text {
    color: #FFFFFF;
    font-size: var(--font-size-xl);
    font-weight: 500;
}

.service-content {
    flex: 1;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.service-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-text-primary);
}

.service-description {
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text-primary);
}

.service-description p {
    margin-bottom: var(--spacing-md);
}

.service-description ul {
    list-style: disc;
    padding-left: var(--spacing-lg);
    margin: var(--spacing-md) 0;
}

.service-description li {
    margin-bottom: var(--spacing-sm);
}

/* ====================================
   Career & Contactセクション
==================================== */
.career-contact-section {
    padding: var(--spacing-4xl) 164px;
    background-color: transparent;
}

.career-contact-container {
    display: flex;
    gap: var(--spacing-3xl);
}

.career-box,
.contact-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.divider {
    width: 1px;
    background-color: var(--color-border);
}

.career-description,
.contact-description {
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text-primary);
}

/* ====================================
   ニュースセクション
==================================== */
.news-section {
    padding: var(--spacing-4xl) 164px;
    background-color: transparent;
}

.news-container {
    display: flex;
    gap: var(--spacing-3xl);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
}

.news-content .news-list {
    width: 100%;
}

.news-content .btn {
    width: auto;
    min-width: 120px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.news-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.news-date {
    font-size: var(--font-size-xs);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.5px;
    color: var(--color-text-tertiary);
}

.news-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.news-title a {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--color-primary);
}

/* ====================================
   レスポンシブ - タブレット
==================================== */
@media (max-width: 1024px) {
    .hero-content {
        padding: 0 60px;
    }

    .mission-section .container {
        padding: 0 100px;
    }

    .about-container {
        flex-direction: column;
        padding: 0 60px;
    }

    .about-image {
        width: 100%;
        height: 400px;
    }

    .services-section,
    .career-contact-section,
    .news-section {
        padding: var(--spacing-4xl) 60px;
    }

    .service-item {
        flex-direction: column;
    }

    .service-logo {
        width: 100%;
    }

}

/* ====================================
   レスポンシブ - モバイル
==================================== */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-size: cover;
    }

    body:not(.home) .site-main {
        margin-top: 80px; /* モバイル時のヘッダーの高さ */
    }

    .hero-section {
        height: auto;
        min-height: 600px;
        padding: 100px 0 60px;
    }

    .hero-content {
        padding: 0 20px;
        margin-top: 60px;
    }

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

    .hero-description {
        font-size: 14px;
    }

    .scroll-indicator {
        right: 20px;
        top: auto;
        bottom: 40px;
        display: none;
    }

    .mission-section .container {
        padding: 0 20px;
    }

    .mission-title {
        font-size: 28px;
    }

    .mission-description {
        font-size: 14px;
    }

    .about-container {
        padding: 0 20px;
        gap: var(--spacing-xl);
    }

    .about-image {
        height: 300px;
    }

    .services-section,
    .career-contact-section,
    .news-section {
        padding: 60px 20px;
    }

    .news-content .btn {
        width: auto;
        min-width: 120px;
    }

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

    .career-contact-container {
        flex-direction: column;
        gap: var(--spacing-2xl);
    }

    .divider {
        width: 100%;
        height: 1px;
    }

    .news-container {
        flex-direction: column;
        gap: var(--spacing-xl);
    }
}

/* ====================================
   アニメーション
==================================== */
@media (prefers-reduced-motion: no-preference) {
    .service-item,
    .news-item {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .service-item:nth-child(1) { animation-delay: 0.1s; }
    .service-item:nth-child(2) { animation-delay: 0.2s; }
    .news-item:nth-child(1) { animation-delay: 0.1s; }
    .news-item:nth-child(2) { animation-delay: 0.2s; }
    .news-item:nth-child(3) { animation-delay: 0.3s; }
    .news-item:nth-child(4) { animation-delay: 0.4s; }
    .news-item:nth-child(5) { animation-delay: 0.5s; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   会社概要ページ
==================================== */
.company-page .container > * {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

.company-info-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

/* ====================================
   お問い合わせページ
==================================== */
.contact-page .container > * {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

/* ====================================
   プライバシーポリシーページ
==================================== */
.privacy-page .container > * {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

/* ====================================
   404エラーページ
==================================== */
.error-404-page .container > * {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

.error-404-page .page-content {
    margin-top: var(--spacing-2xl);
    text-align: center;
}

.error-404-message {
    font-size: var(--font-size-base);
    line-height: 2;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-3xl);
}

.error-404-actions {
    margin-bottom: var(--spacing-3xl);
}

.error-404-links {
    text-align: center;
}

.error-404-links h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-primary);
}

.error-404-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
}

.error-404-links li {
    margin: 0;
}

.error-404-links a {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.error-404-links a:hover {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .error-404-links ul {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

.privacy-content {
    line-height: 1.8;
}

.privacy-content h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-top: var(--spacing-3xl);
    margin-bottom: var(--spacing-lg);
}

.privacy-content h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
}

.privacy-content p {
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-secondary);
}

.privacy-content ul,
.privacy-content ol {
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-xl);
    color: var(--color-text-secondary);
}

.privacy-content li {
    margin-bottom: var(--spacing-sm);
}

.company-info-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.company-info-label {
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1.5;
    color: #1C1C1E;
}

.company-info-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.company-info-value {
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.company-info-divider {
    width: 100%;
    height: 1px;
    background-color: var(--color-border);
}

/* ====================================
   レスポンシブ - 会社ページ
==================================== */
@media (max-width: 768px) {
    .company-info-container {
        gap: var(--spacing-md);
    }
}

/* ====================================
   印刷スタイル
==================================== */
@media print {
    .site-header,
    .site-footer,
    .scroll-indicator,
    .btn {
        display: none;
    }

    .hero-section {
        height: auto;
        page-break-after: always;
    }
}

/* Contact Form 7 カスタムスタイル */
  
  /* フォーム行の基本スタイル */
  .form-row {
    margin-bottom: 24px;
  }
  
  /* ラベルスタイル */
  .form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
  }
  
  /* 必須マーク */
  .required {
    color: #e53e3e;
    margin-left: 4px;
  }
  
  /* 入力フィールドの共通スタイル */
  .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #f7fafc;
    transition: all 0.2s;
    box-sizing: border-box;
  }
  
  .form-control:focus {
    outline: none;
    border-color: #0080ff;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
  }
  
  /* お名前フィールド（2カラム） */
  .name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  /* 所属フィールド（2カラム） */
  .department-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  /* テキストエリア */
  textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
  }
  
  /* セレクトボックス */
  select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
  }
  
  /* 同意チェックボックス */
  .form-row-acceptance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .form-row-acceptance .wpcf7-list-item {
    margin: 0;
  }

  .form-row-acceptance label {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .form-row-acceptance input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    vertical-align: middle;
  }
  
  .form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
  }
  
  /* 送信ボタン */
  .form-row-submit {
    margin-top: 32px;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  .submit-button {
    background-color: #0080ff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 40px;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 128, 255, 0.2);
  }
  
  .submit-button:hover {
    background-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.3);
    transform: translateY(-1px);
  }
  
  .submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 128, 255, 0.2);
  }
  
  /* バリデーションエラー */
  .wpcf7-not-valid-tip {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    display: block;
  }
  
  .wpcf7-not-valid {
    border-color: #e53e3e !important;
  }
  
  /* 送信完了・エラーメッセージ */
  .wpcf7-response-output {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
  }
  
  .wpcf7-mail-sent-ok {
    background-color: #c6f6d5;
    border: 1px solid #48bb78;
    color: #22543d;
  }
  
  .wpcf7-mail-sent-ng,
  .wpcf7-validation-errors {
    background-color: #fed7d7;
    border: 1px solid #e53e3e;
    color: #742a2a;
  }
  
  /* レスポンシブ対応 */
  @media (max-width: 640px) {
    .name-fields,
    .department-fields {
      grid-template-columns: 1fr;
      gap: 16px;
    }
  }
  
  /* スピナー（送信中） */
  .wpcf7-spinner {
    margin-left: 10px;
  }
  
  /* プレースホルダーのスタイル */
  .form-control::placeholder {
    color: #a0aec0;
    opacity: 1;
  }
  
  .form-control::-webkit-input-placeholder {
    color: #a0aec0;
  }
  
  .form-control::-moz-placeholder {
    color: #a0aec0;
  }

/* ====================================
   レスポンシブ - フッター
==================================== */
@media (max-width: 960px) {
    .footer-navigation nav {
        flex-wrap: wrap;
        gap: var(--spacing-md) var(--spacing-lg);
    }

    .service-content {
        padding-left: 0;
        padding-right: 0;
    }

    .news-section .section-header {
        align-items: flex-start;
        text-align: left;
    }
}

/* モバイル用背景画像 (770px以下) */
@media (max-width: 770px) {
    body {
        background-image: url('../images/corporate-hero-mobile.png');
        background-size: 100% auto;
        background-attachment: fixed;
    }
}