/* Page Header Component */
.page-header {
    position: relative;
    height: 300px;
    background-color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header__overlay {
    display: none;
}

.page-header .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.page-header__title-ja {
    color: var(--color-white);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header__title-en {
    color: var(--color-white);
    font-size: 18px;
    font-weight: 400;
    font-family: Georgia, serif;
    opacity: 0.9;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f5f5f5;
    padding: 12px 0;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: #999;
}

.breadcrumb a {
    color: var(--color-main);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb li:last-child {
    color: #666;
}

/* Page Content */
.page-content {
    padding: var(--section-padding-pc) 0;
}

.content-section {
    margin-bottom: 80px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-heading {
    font-size: 32px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--color-main);
}

/* 2-Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.two-column--reverse {
    grid-template-columns: 1fr 1fr;
}

.two-column__image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.two-column__text h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.two-column__text p {
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Definition List / Table Styles */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.info-table th,
.info-table td {
    padding: 15px 20px;
    border: 1px solid #ddd;
    text-align: left;
}

.info-table th {
    background-color: var(--color-main);
    color: var(--color-white);
    font-weight: 500;
    width: 30%;
}

.info-table td {
    background-color: var(--color-white);
}

/* Qualification Table (nested in info-table) */
.qualification-table {
    width: auto;
    border-collapse: collapse;
    margin-top: 10px;
}

.qualification-table td {
    padding: 2px 0;
    border: none;
    background-color: transparent;
}

.qualification-table td:first-child {
    width: auto;
    padding-right: 30px;
    white-space: nowrap;
}

.qualification-table td:last-child {
    text-align: left;
    padding-left: 30px;
}

.info-dl {
    margin: 30px 0;
}

.info-dl dt {
    background-color: var(--color-main);
    color: var(--color-white);
    padding: 12px 20px;
    font-weight: 500;
    margin-top: 2px;
}

.info-dl dd {
    background-color: #f9f9f9;
    padding: 15px 20px;
    margin: 0;
    border-left: 3px solid var(--color-accent);
}

/* STEP Flow */
.step-flow {
    margin: 50px 0;
}

.step-item {
    position: relative;
    padding: 30px;
    background-color: var(--color-white);
    border: 2px solid var(--color-main);
    border-radius: 8px;
    margin-bottom: 40px;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-item::after {
    content: '▼';
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: var(--color-main);
}

.step-item:last-child::after {
    display: none;
}

.step-number {
    display: inline-block;
    background-color: var(--color-main);
    color: var(--color-white);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.step-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--color-main);
}

.step-description {
    line-height: 1.8;
}

/* Accordion (FAQ) */
.accordion {
    margin: 30px 0;
}

.accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-question {
    background-color: var(--color-bg-light);
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color 0.3s;
}

.accordion-question:hover {
    background-color: #e8e8e8;
}

.accordion-question::before {
    content: 'Q';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-main);
    color: var(--color-white);
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.accordion-question::after {
    content: '+';
    margin-left: auto;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-main);
    transition: transform 0.3s;
}

.accordion-question.active::after {
    content: '−';
}

.accordion-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--color-white);
}

.accordion-answer.open {
    max-height: 1000px;
}

.accordion-answer-content {
    padding: 20px;
    padding-left: 75px;
}

.accordion-answer-content::before {
    content: 'A';
    /* display: inline-block; - ignored due to float */
    width: 40px;
    height: 40px;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-weight: 700;
    margin-left: -55px;
    margin-right: 15px;
    float: left;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: center;
}

.comparison-table thead th {
    background-color: var(--color-main);
    color: var(--color-white);
    font-weight: 500;
}

.comparison-table tbody th {
    background-color: #f5f5f5;
    font-weight: 500;
    text-align: left;
}

.comparison-table .highlight {
    background-color: #fff9e6;
    font-weight: 700;
    color: var(--color-main);
}

/* Reason Page Specific Styles */
.reason-top-section {
    margin-bottom: 60px;
}

.reason-top-title {
    color: var(--color-main);
    font-size: 2.4rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
}

.reason-intro-box {
    background-color: var(--color-white);
    padding: 40px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 60px;
}

/* Hero Box with Floating Content */
.hero-box {
    position: relative;
    margin-bottom: 60px;
}

.hero-box img {
    width: 50%;
    height: auto;
    display: block;
}

.hero-box.image-right img {
    margin-left: auto;
}

.floating-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-white);
    padding: 40px;
    width: 55%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.floating-box.right {
    right: 0;
}

.floating-box.left {
    left: 0;
}

.floating-box h4 {
    color: var(--color-main);
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Situation & Track Record Section */
.situation-track-record {
    display: flex;
    margin-bottom: 60px;
    color: var(--color-white);
}

.situation-box {
    background-color: #4d4d4d;
    width: 50%;
    padding: 40px 20px;
    position: relative;
    text-align: center;
}

.situation-box h3,
.track-record-box h3 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-white);
    display: inline-block;
    padding-bottom: 10px;
}

.situation-box .arrow-right {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 20px solid #4d4d4d;
    z-index: 1;
}

.track-record-box {
    background-color: var(--color-main);
    width: 50%;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Beige Box & Example */
.beige-box {
    background-color: #fdfbf0;
    border: 1px solid #e0dcc5;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.icon-circle {
    background-color: #c1b684;
    color: var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.inheritance-example {
    background-color: var(--color-white);
    border: 1px solid #ddd;
    padding: 30px;
    margin-bottom: 50px;
}

.example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.example-case {
    border-right: 1px solid #eee;
    padding-right: 30px;
}

.example-case:last-child {
    border-right: none;
    padding-right: 0;
}

.example-result {
    margin-top: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 1.3rem;
    background-color: #f9f9f9;
    padding: 15px;
}

.beige-bar {
    background-color: #c1b684;
    padding: 15px 20px;
    margin-bottom: 10px;
    color: var(--color-white);
    font-weight: bold;
    display: flex;
    align-items: center;
}

.beige-content {
    background-color: var(--color-white);
    border: 1px solid #c1b684;
    padding: 20px;
    margin-bottom: 30px;
}

/* Responsive - SP */
@media screen and (max-width: 767px) {
    .page-header {
        height: 200px;
    }

    .page-header__title-ja {
        font-size: 28px;
    }

    .page-header__title-en {
        font-size: 14px;
    }

    .section-heading {
        font-size: 24px;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .two-column--reverse {
        grid-template-columns: 1fr;
    }

    .two-column--reverse .two-column__image {
        order: -1;
    }

    .info-table,
    .info-table tbody,
    .info-table tr,
    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }

    .info-table th {
        width: 100%;
    }

    .info-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
    }

    .comparison-table {
        font-size: 12px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px;
    }

    .accordion-answer-content {
        padding-left: 20px;
    }

    .accordion-answer-content::before {
        margin-left: 0;
        margin-bottom: 10px;
    }

    /* Reason Page SP */
    .reason-top-title {
        font-size: 1.8rem;
    }

    .reason-intro-box {
        padding: 20px;
    }

    .hero-box {
        margin-bottom: 40px;
    }

    .hero-box img {
        width: 100%;
    }

    .floating-box {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        margin-top: -20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .situation-track-record {
        flex-direction: column;
    }

    .situation-box,
    .track-record-box {
        width: 100%;
    }

    .situation-box .arrow-right {
        right: 50%;
        top: auto;
        bottom: -20px;
        transform: translateX(50%) rotate(90deg);
        border-left-color: #4d4d4d;
    }

    .example-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .example-case {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }

    .example-case:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}