/*
Theme Name: Engineer LP Theme
Description: エンジニア向けランディングページテーマ
Version: 2.2.0
Author: Engineer LP Team
Text Domain: engineer-lp-theme
*/

/* ==== Q3 都道府県メニュー: 地域グルーピング 横並び表示 ==== */
#prefecture-menu .prefecture-grid {
  /* 初期形式に近いフラット配置へ（サイズは元CSSに委譲） */
  display: flex;
  flex-wrap: wrap;
}

#prefecture-menu .region-group {
  /* 枠をなくしてフラットに */
  display: contents; /* 見出し以外はフローに溶かす */
}

#prefecture-menu .region-title {
  /* ラベルは行頭区切りとして薄く表示 */
  display: block;
  width: 100%;
  margin: 10px 0 2px;
  font-weight: 600;
  font-size: 12px;
  color: #6b7280; /* グレー */
}

#prefecture-menu .region-grid {
  display: contents; /* ボタンを親のフレックスに直接流す */
}

/* ボタンのサイズは既存テーマに合わせるため、上書きしない */

@media (max-width: 640px) {
  #prefecture-menu .prefecture-grid {
    /* モバイル時の余白も元CSSに委譲 */
  }
}
/* ==== /Q3 都道府県メニュー ==== */
/*
Theme Name: Transfer Agent Diagnosis System 2.2.0
Theme URI: https://ses-tensyoku.com/
Description: 転職エージェント診断システム用の高度な診断機能とリアルタイム分析を備えたモバイル最適化テーマ（PHP 8.3+必須）
Version: 2.2.0
Author: SATO
Author URI: https://sato-dev.com
Text Domain: transfer-agent-diagnosis
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 8.3
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: transfer-agent, diagnosis-system, realtime-analytics, mobile-optimized, responsive, custom-post-type, advanced-recommendation, behavioral-analysis
*/

/* CSS変数は critical.css で定義されています */

/* ===== リセット & ベーススタイル ===== */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--gradient-hero);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    line-height: 1.8;
    font-size: 18px;
    position: relative;
}

/* メディアのはみ出し抑止（横スクロール防止） */
img, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

body {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== レイアウト ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg);
}

.u-row.is-right_sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
        padding: 0 20px;
}

.l-content__main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* ===== ヘッダー ===== */
.site-header {
    background: var(--primary);
    padding: 20px 0;
    position: static;
    box-shadow: var(--shadow-medium);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    font: 700 24px sans-serif;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,.1);
    text-decoration: none;
}

.brand:hover {
    color: #f0f9ff;
}

/* ===== ヒーローセクション ===== */
.hero {
    background: var(--gradient-hero);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,122,210,0.05) 0%, rgba(5,47,135,0.05) 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin: 0 0 24px;
    line-height: 1.2;
}

.hero-title-accent {
    color: var(--primary-dark);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin: 0 0 32px;
    line-height: 1.6;
}

.hero-cta {
    display: inline-block;
    background: var(--gradient-cta);
    color: var(--white);
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: var(--weight-semibold);
    font-size: var(--font-lg);
    transition: var(--transition-base);
    box-shadow: var(--shadow-warm);
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0,122,210,0.3);
}

.hero-cta:hover::before {
    left: 100%;
}

/* ===== セクション ===== */
.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin: 0 0 16px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
    line-height: 1.6;
}

/* ===== カード ===== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: var(--space-xl);
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.card-header {
    margin-bottom: 24px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin: 0 0 8px;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

/* ===== ボタン ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: var(--weight-semibold);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-warm);
}

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

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

/* ===== フォーム ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 18px;
    transition: var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,122,210,.1);
}

.form-error {
    color: var(--error);
        font-size: 14px;
    margin-top: 5px;
}

/* ===== グリッド ===== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== ユーティリティクラス ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

/* ===== サイドバー ===== */
.side {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--radius-md);
    height: fit-content;
    width: 300px;
    flex-shrink: 0;
    position: static;
}

.sidebar-widget {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition-base);
}

.sidebar-widget:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: white !important;
    margin: 0 0 15px 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--primary), #0056b3);
    border-radius: 6px;
    position: relative;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
}

.widget li:hover {
    background: rgba(0,122,210,0.05);
    border-radius: 6px;
    padding-left: 8px;
}

.widget a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

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

/* ===== 記事関連 ===== */
.article {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-bottom: 32px;
}

.article-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--border-light);
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.article-thumbnail {
    position: relative;
    width: 100%;
    margin: 20px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.article-body {
    padding: 30px;
    line-height: 1.8;
}

.article-body h2 {
    font-size: 1.8rem;
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    position: relative;
}

.article-body h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin: 25px 0 15px;
    position: relative;
    padding-left: 20px;
}

.article-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.article-body p {
    margin: 0 0 15px 0;
}

.article-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition-base);
}

.article-body a:hover {
    border-bottom-color: var(--primary);
    color: var(--primary-dark);
}

/* ===== ページネーション ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination a,
.pagination .current {
    display: inline-block;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: var(--weight-medium);
    transition: var(--transition-base);
    min-width: 44px;
    text-align: center;
}

.pagination a:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .prev,
.pagination .next {
    font-weight: var(--weight-semibold);
}

.pagination .dots {
    color: var(--muted);
    border: none;
    cursor: default;
}

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

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-logo {
    font: 700 24px sans-serif;
    margin-bottom: 24px;
    color: #ffffff !important;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff !important;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    opacity: 1;
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent) !important;
}

.footer-copyright {
    opacity: 0.6;
    font: 14px sans-serif;
    color: #ffffff !important;
    text-align: center;
}

/* ===== レスポンシブデザイン ===== */

/* タブレット */
@media screen and (max-width: 1024px) {
    .u-row.is-right_sidebar {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px;
    }
    
    .container {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
}

/* モバイル */
@media screen and (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .brand {
        font-size: 20px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: var(--space-sm);
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* 診断フォームの横はみ出し抑止と幅統一 */
    #diagnosis,
    .diagnosis-section,
    .diagnosis-container {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    #diagnosis .c-urge_form_head,
    #diagnosis .c-urge_form_radio,
    #diagnosis .radio_label,
    #diagnosis .prefecture-selector,
    #diagnosis .prefecture-display,
    #diagnosis .prefecture-menu {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #diagnosis .prefecture-menu {
        left: 0;
        right: 0;
    }
    
    .article-header {
        padding: 20px 20px 15px;
    }
    
    .article-header h1 {
        font-size: 24px;
    }
    
    .article-body {
        padding: 20px;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
    }
    
    .footer {
        padding: 30px 0 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* 小さいモバイル */
@media screen and (max-width: 480px) {
    .brand {
        font-size: 18px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .article-header h1 {
        font-size: 20px;
    }
    
    .article-body h2 {
        font-size: 1.3rem;
    }
    
    .article-body h3 {
        font-size: 1.1rem;
    }
}

/* ===== アニメーション ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn var(--transition-slow) ease;
}

.slide-up {
    animation: slideUp var(--transition-slow) ease;
}

/* ===== アクセシビリティ ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e5e7eb;
        --text-light: #9ca3af;
        --bg-white: #1f2937;
        --bg-light: #111827;
    }
}

/* ===== フォーカス管理 ===== */
button:focus,
select:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== タッチデバイス最適化 ===== */
@media (hover: none) and (pointer: coarse) {
    button,
    .btn,
    input[type="button"],
    input[type="submit"],
    .clickable,
    a,
    .agent-card,
    .ranking-item {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
}

/* ===== 高解像度ディスプレイ対応 ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .agent-card,
    .ranking-item,
    .diagnosis-content {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

 

 
