/* === リセット & ベース === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.7;
    min-height: 100vh;
}

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

/* === ヘッダー === */
.header {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #fff;
    padding: 24px 0;
    text-align: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.header-tagline {
    margin-top: 6px;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* === 広告スペース === */
.ad-space {
    text-align: center;
    padding: 10px 0;
}

.ad-placeholder {
    background: #e8ecf1;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    color: #999;
    font-size: 0.85rem;
    max-width: 728px;
    margin: 0 auto;
}

.ad-middle {
    margin: 30px 0;
}

/* === メインコンテンツ === */
.main-content {
    padding: 30px 20px;
}

/* === ポータルナビゲーション === */
.portal-nav {
    margin-bottom: 24px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #666;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.portal-card:hover {
    border-color: #2b6cb0;
    color: #2b6cb0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.15);
}

.portal-card.active {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.portal-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.portal-title {
    line-height: 1.3;
}

/* === 免責バッジ === */
.disclaimer-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: #c53030;
}

.disclaimer-icon {
    font-size: 1.1rem;
}

/* === プライバシーバッジ === */
.privacy-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    color: #2e7d32;
}

.privacy-icon {
    font-size: 1.1rem;
}

/* === 計算フォーム === */
.calc-section {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.calc-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2b6cb0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-divider {
    border: none;
    border-top: 1px solid #e8ecf1;
    margin: 24px 0;
}

.form-section-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2b6cb0;
    margin-bottom: 16px;
    padding-bottom: 4px;
    border-bottom: 2px solid #bee3f8;
}

.income-type-options {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}

.income-type-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.income-type-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.input-with-unit {
    position: relative;
}

.input-with-unit input {
    padding-right: 50px;
}

.input-unit {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 0.9rem;
    pointer-events: none;
}

.calc-btn {
    width: 100%;
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.35);
}

/* === 計算結果 === */
.result-section {
    display: none;
    margin-top: 24px;
    animation: fadeInUp 0.5s ease;
}

.result-section.show {
    display: block;
}

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

.result-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #2b6cb0;
}

.result-label {
    font-size: 0.95rem;
    color: #666;
    text-align: center;
    margin-bottom: 8px;
}

.result-amount {
    font-size: 2.8rem;
    font-weight: 900;
    color: #1a365d;
    text-align: center;
    line-height: 1.2;
}

.result-amount small {
    font-size: 1.2rem;
    font-weight: 500;
}

.result-range {
    text-align: center;
    margin-top: 12px;
    padding: 12px;
    background: #ebf8ff;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2b6cb0;
}

.result-range-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 12px 0 8px;
    position: relative;
}

.result-range-fill {
    height: 100%;
    background: linear-gradient(90deg, #2b6cb0, #4299e1);
    border-radius: 4px;
    position: absolute;
    left: 20%;
    width: 60%;
}

.result-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #888;
}

.result-breakdown {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e8ecf1;
}

.result-breakdown h4 {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 12px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    color: #666;
}

.breakdown-value {
    font-weight: 600;
    color: #333;
}

.result-disclaimer {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fffbeb;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #92400e;
    line-height: 1.6;
}

/* === 慰謝料レンジバー === */
.isharyou-range {
    margin-top: 16px;
}

.range-visual {
    position: relative;
    height: 40px;
    background: linear-gradient(90deg, #e2e8f0 0%, #bee3f8 50%, #4299e1 100%);
    border-radius: 8px;
    margin: 12px 0;
}

.range-marker {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 56px;
    background: #c53030;
    border-radius: 2px;
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

/* === 資産リスト（財産分与） === */
.asset-list {
    margin-bottom: 20px;
}

.asset-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    flex-wrap: wrap;
}

.asset-row .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 120px;
}

.asset-row .form-group label {
    font-size: 0.82rem;
}

.asset-row .form-group input,
.asset-row .form-group select {
    padding: 8px 10px;
    font-size: 0.88rem;
}

.asset-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    white-space: nowrap;
    padding-bottom: 8px;
}

.asset-checkbox input[type="checkbox"] {
    width: auto;
}

.remove-asset-btn {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 4px;
}

.remove-asset-btn:hover {
    background: #fff5f5;
}

.add-asset-btn {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 2px dashed #bee3f8;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.add-asset-btn:hover {
    background: #bee3f8;
    border-color: #2b6cb0;
}

/* === 説明セクション（SEO） === */
.info-section {
    margin-top: 40px;
}

.info-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.info-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #333;
}

.info-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}

/* === FAQ === */
.faq-section {
    margin-top: 40px;
}

.faq-item {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 300;
    color: #2b6cb0;
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    padding: 0 20px 16px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

/* === フッター === */
.footer {
    background: #1a2332;
    color: #aaa;
    text-align: center;
    padding: 24px 20px;
    margin-top: 50px;
    font-size: 0.85rem;
}

.footer-disclaimer {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #777;
}

.footer-nav {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.82rem;
}

.footer-nav a:hover {
    color: #fff;
}

/* === 下層ページ共通 === */
.logo-link {
    text-decoration: none;
    color: inherit;
}

.page-content {
    padding: 40px 20px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 30px;
}

.page-body {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    line-height: 1.8;
}

.page-body h3 {
    font-size: 1.1rem;
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #2b6cb0;
    color: #333;
}

.page-body h3:first-child {
    margin-top: 0;
}

.page-body p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #444;
}

.page-body ul {
    margin: 8px 0 16px 20px;
    font-size: 0.95rem;
    color: #444;
}

.page-body li {
    margin-bottom: 8px;
}

.page-body a {
    color: #2b6cb0;
}

/* === お問い合わせフォーム === */
.contact-form {
    margin-top: 24px;
}

.submit-btn {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.4);
}

/* === ブログ記事ページ === */
.blog-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.blog-hero h2 {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.blog-meta {
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.85;
}

.blog-cta {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #fff;
    margin: 30px 0;
}

.blog-cta h3 {
    border: none !important;
    color: #fff !important;
    margin: 0 0 8px !important;
}

.blog-cta p {
    color: rgba(255,255,255,0.9) !important;
    margin-bottom: 16px !important;
}

.blog-cta-btn {
    display: inline-block;
    background: #fff;
    color: #1a365d;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

.blog-cta-btn:hover {
    transform: translateY(-2px);
}

/* === レスポンシブ === */
@media (max-width: 600px) {
    .logo {
        font-size: 1.4rem;
    }

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

    .form-row {
        flex-direction: column;
        gap: 0;
    }

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

    .calc-section {
        padding: 20px 16px;
    }

    .result-amount {
        font-size: 2rem;
    }

    .asset-row {
        flex-direction: column;
        align-items: stretch;
    }

    .asset-row .form-group {
        min-width: 100%;
    }

    .blog-hero h2 {
        font-size: 1.2rem;
    }
}
