@charset "utf-8";

/* モバイルファーストのレスポンシブデザイン
------------------------------------------------------------------------------------------------------------------------------------------------------*/

/* モバイル用CSS変数 */
@media (max-width: 900px) {
  :root {
    --header-height: 60px;
    --nav-height: auto;
    --spacing-mobile: 0.75rem;
    --font-size-mobile: 14px;
  }
}

/* モバイルヘッダー */
@media (max-width: 900px) {
  .modern-header {
    height: var(--header-height);
    position: fixed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .modern-header .inner {
    padding: 0 var(--spacing-mobile);
  }
  
  .modern-header #logo {
    height: 40px;
  }
  
  .header-actions .cta-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* モバイルメニューボタン */
.mobile-menu-button {
  display: none;
  position: fixed;
  top: 10px;
  right: 15px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  margin: 5px auto;
  transition: all 0.3s ease;
}

.mobile-menu-button.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-button.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 900px) {
  .mobile-menu-button {
    display: block;
  }
}

/* モバイルナビゲーション */
@media (max-width: 900px) {
  .modern-nav {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-height));
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }
  
  .modern-nav.mobile-open {
    left: 0;
  }
  
  .modern-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
  }
  
  .modern-nav li {
    border-bottom: 1px solid var(--border-color);
  }
  
  .modern-nav a {
    padding: 1rem;
    display: block;
    font-size: 1rem;
  }
  
  .modern-nav a::after {
    display: none;
  }
  
  .modern-nav .current a,
  .modern-nav a:active {
    background: var(--bg-secondary);
    color: var(--primary-color);
  }
}

/* モバイル用オーバーレイ */
@media (max-width: 900px) {
  .modern-nav.mobile-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: -1;
  }
}

/* モバイルヒーローセクション */
@media (max-width: 900px) {
  .hero-section {
    height: 60vh;
    min-height: 350px;
    margin-top: var(--header-height);
  }
  
  .hero-content {
    padding: var(--spacing-sm);
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-content p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}

/* モバイルコンテンツレイアウト */
@media (max-width: 900px) {
  .modern-content {
    padding: var(--spacing-mobile);
    margin-top: var(--spacing-md);
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .card {
    padding: var(--spacing-sm);
    border-radius: 8px;
  }
  
  .card h2 {
    font-size: 1.25rem;
  }
  
  .card h3 {
    font-size: 1.1rem;
  }
}

/* モバイル求人カード */
@media (max-width: 900px) {
  .job-card {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
  }
  
  .job-card h4 {
    font-size: 1rem;
  }
  
  .job-card p {
    font-size: 0.8125rem;
  }
}

/* モバイル特徴グリッド */
@media (max-width: 900px) {
  .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .feature-item {
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: 8px;
  }
  
  .feature-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .feature-item p {
    font-size: 0.875rem;
    line-height: 1.6;
  }
}

/* モバイルフッター */
@media (max-width: 900px) {
  .modern-footer {
    margin-top: var(--spacing-lg);
  }
  
  .footer-content {
    padding: var(--spacing-md) var(--spacing-mobile);
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    text-align: left;
  }
  
  .footer-column h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .footer-column ul {
    margin-bottom: 1rem;
  }
  
  .footer-column a {
    font-size: 0.8125rem;
  }
  
  .footer-bottom {
    padding: var(--spacing-sm);
    font-size: 0.75rem;
  }
}

/* モバイルスクロールトップボタン */
@media (max-width: 900px) {
  .scroll-top {
    width: 40px;
    height: 40px;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
  }
}

/* モバイルタグリスト */
@media (max-width: 900px) {
  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
  }
  
  .tag-list li {
    margin: 0;
  }
  
  .tag-list a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
  }
  
  .tag-list a:hover,
  .tag-list a:active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }
}

/* モバイル用テーブル */
@media (max-width: 900px) {
  table {
    font-size: 0.875rem;
  }
  
  table td,
  table th {
    padding: 0.5rem;
  }
  
  /* 横スクロール可能なテーブル */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* モバイル用フォーム */
@media (max-width: 900px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    width: 100%;
    padding: 0.75rem;
    font-size: 16px; /* iOSのズーム防止 */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    -webkit-appearance: none;
  }
  
  button[type="submit"] {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
  }
}

/* パフォーマンス最適化 */
@media (max-width: 900px) {
  /* 不要なアニメーションを削減 */
  * {
    animation-duration: 0.3s !important;
  }
  
  /* GPUアクセラレーション */
  .mobile-menu-button,
  .modern-nav,
  .scroll-top {
    transform: translateZ(0);
    will-change: transform;
  }
}

/* タッチデバイス用の調整 */
@media (hover: none) and (pointer: coarse) {
  /* タップターゲットのサイズを確保 */
  a,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* ホバーエフェクトを無効化 */
  a:hover,
  button:hover {
    color: inherit;
    background: inherit;
  }
  
  /* アクティブ状態のスタイル */
  a:active,
  button:active {
    opacity: 0.8;
  }
}

/* 小型デバイス（375px以下）向け */
@media (max-width: 375px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  .card h2 {
    font-size: 1.125rem;
  }
  
  .modern-content {
    padding: 0.5rem;
  }
}

/* 横向き表示の最適化 */
@media (max-width: 900px) and (orientation: landscape) {
  .hero-section {
    height: 80vh;
  }
  
  .modern-header {
    height: 50px;
  }
  
  .modern-nav {
    top: 50px;
    height: calc(100vh - 50px);
  }
}