/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5490;
    --secondary-color: #e85d35;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* セクション */
.section {
    min-height: 100vh;
    padding: 60px 20px;
}

.hidden {
    display: none !important;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ヒーローセクション */
.hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), #2563a8);
    color: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.headline {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

.highlight {
    color: #ffd700;
    font-weight: bold;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 3px solid #ffd700;
    display: inline-block;
    padding-bottom: 10px;
}

.description {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ベネフィット */
.benefits {
    margin-bottom: 60px;
}

.benefits h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.benefit-grid {
    display: grid;
    gap: 30px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 2rem;
    color: var(--success-color);
    flex-shrink: 0;
}

.benefit-text h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.benefit-text p {
    color: #666;
}

/* フロー */
.flow {
    margin-bottom: 60px;
}

.flow h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.flow-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.flow-step {
    flex: 1;
    min-width: 150px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.step-number {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.step-time {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.step-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* CTA */
.cta-section {
    text-align: center;
    margin-top: 60px;
}

.cta-button {
    background: linear-gradient(135deg, var(--secondary-color), #ff7a59);
    color: white;
    border: none;
    padding: 25px 50px;
    font-size: 1.4rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(232, 93, 53, 0.3);
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(232, 93, 53, 0.4);
}

.cta-sub {
    font-size: 0.9rem;
    font-weight: normal;
}

.cta-note {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

/* 診断フォーム */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.3s;
    width: 14.28%;
}

.progress-text {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.question-card {
    display: none;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.3s;
}

.question-card.active {
    display: block;
}

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

.question-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.options {
    margin-bottom: 30px;
}

.option-label {
    display: block;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-label:hover {
    background: #e3f2fd;
    border-color: var(--primary-color);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    margin-right: 15px;
}

.option-label input[type="radio"]:checked + span,
.option-label input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: bold;
}

.text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.required {
    color: var(--danger-color);
}

.optional {
    color: #999;
    font-weight: normal;
    font-size: 0.9rem;
}

.optional-label {
    color: #999;
    font-weight: normal;
    font-size: 0.9rem;
}

/* 診断者プロフィール */
.advisor-profile {
    margin: 60px 0;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.advisor-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.advisor-photo {
    flex-shrink: 0;
}

.advisor-photo-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.advisor-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #2563a8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.advisor-info h4 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.advisor-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.advisor-credential {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 12px;
}

.advisor-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
}

/* 連絡先フォーム（診断後） */
.contact-form-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-form-card h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.contact-intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.7;
}

.btn-submit-contact {
    width: 100%;
    padding: 18px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit-contact:hover {
    background: #d44d2d;
    transform: translateY(-2px);
}

.contact-note {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 0.9rem;
}


.question-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-back,
.btn-next,
.btn-submit {
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back {
    background: #6c757d;
    color: white;
}

.btn-back:hover {
    background: #5a6268;
}

.btn-next,
.btn-submit {
    background: var(--primary-color);
    color: white;
    flex-grow: 1;
}

.btn-next:hover,
.btn-submit:hover {
    background: #0d3a66;
}

.btn-submit {
    background: var(--secondary-color);
}

.btn-submit:hover {
    background: #d44d2d;
}

/* 診断結果 */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.diagnosis-date {
    color: #666;
}

.result-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
}

.matrix-diagram {
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
    position: relative;
    aspect-ratio: 1;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
}

.matrix-quadrant {
    position: absolute;
    width: 50%;
    height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    border: 1px solid #ccc;
    transition: all 0.3s;
}

.matrix-quadrant.active {
    background: rgba(26, 84, 144, 0.1);
    border: 3px solid var(--primary-color);
    z-index: 10;
}

.quadrant-a {
    top: 0;
    right: 0;
    background: #e8f5e9;
}

.quadrant-b {
    top: 0;
    left: 0;
    background: #fff3e0;
}

.quadrant-c {
    bottom: 0;
    right: 0;
    background: #e3f2fd;
}

.quadrant-d {
    bottom: 0;
    left: 0;
    background: #fce4ec;
}

.quadrant-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.quadrant-description {
    font-size: 0.85rem;
    color: #666;
}

.matrix-labels {
    position: absolute;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-color);
}

.label-top {
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.label-left {
    left: -100px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
}

.result-summary {
    margin-top: 30px;
}

.summary-item {
    display: flex;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item .label {
    font-weight: bold;
    margin-right: 10px;
    color: var(--primary-color);
    min-width: 140px;
}

.summary-item .value {
    color: var(--text-color);
    flex-grow: 1;
}

.action-list {
    list-style: none;
}

.action-item {
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
}

.action-item .action-timeline {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.action-item .action-text {
    font-size: 1.1rem;
    color: var(--text-color);
}

.warning-card {
    background: #fff8e1 !important;
    border: 2px solid var(--warning-color);
}

.risk-list {
    list-style: none;
}

.risk-item {
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-left: 5px solid var(--danger-color);
    border-radius: 8px;
    color: var(--text-color);
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color), #2563a8);
    color: white;
    text-align: center;
}

.cta-card h3 {
    color: white;
    border-left: none;
    padding-left: 0;
}

.cta-button-secondary {
    display: inline-block;
    margin-top: 20px;
    padding: 20px 40px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-button-secondary:hover {
    background: #d44d2d;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-download {
    margin-top: 20px;
    padding: 15px 30px;
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download:hover {
    background: transparent;
    color: white;
}

.btn-print {
    margin-top: 10px;
    padding: 15px 30px;
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-print:hover {
    background: transparent;
    color: white;
}

/* 印刷用スタイル */
@media print {
    /* 印刷時に不要な要素を非表示 */
    .cta-card,
    footer,
    .btn-download,
    .btn-print,
    nav,
    header {
        display: none !important;
    }
    
    /* 印刷時の背景色を保持 */
    .result-card {
        break-inside: avoid;
    }
    
    /* 印刷時のレイアウト調整 */
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
}

/* 管理者ログイン */
.login-card {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.login-card h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    background: #0d3a66;
}

/* 管理者ダッシュボード */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h2 {
    color: var(--primary-color);
}

.btn-logout {
    padding: 10px 25px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.admin-actions {
    margin-bottom: 30px;
    text-align: right;
}

.btn-export {
    padding: 12px 30px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-export:hover {
    background: #218838;
}

.data-table {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

tr:hover {
    background: #f8f9fa;
}

/* フッター */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 20px;
}

footer a {
    color: #ffd700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .headline {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .flow-steps {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .question-card {
        padding: 25px;
    }

    .question-title {
        font-size: 1.2rem;
    }

    .result-card {
        padding: 25px;
    }

    .matrix-diagram {
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
    }

    .advisor-content {
        flex-direction: column;
        text-align: center;
    }

    .advisor-photo-placeholder {
        width: 100px;
        height: 100px;
        font-size: 1rem;
    }
}
