/* assets/css/proton.css */

.proton-section {
    padding-top: 3rem;
    background-color: #fff;
}

.proton-container {
    width: 100%;
    max-width: 69rem;
    /* max-w-4xl, matches detail/policy layout */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ヒーロー的なリード文 */
.proton-lead {
    margin-top: 5rem;
    margin-bottom: 3.5rem;
    text-align: left;
}

.proton-lead__title {
    font-family: var(--font-serif);
    font-size: 36px;
    /* ~28px */
    font-weight: 700;
    color: #0f172a;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.proton-lead__text {
    font-family: var(--font-serif);
    color: #333;
    line-height: 2.2;
    font-size: 18px;
    text-align: left;
    /* ~17px */
}

/* セクション説明文 */
.proton-content {
    margin-top: 45px;
    text-align: left;
}

.proton-content__heading {
    font-family: var(--font-serif);
    font-size: 36px;
    /* ~24px */
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.proton-content__text {
    font-family: var(--font-serif);
    color: #333;
    line-height: 2.2;
    font-size: 18px;
}

@media (min-width: 1024px) {
    .proton-container {
        padding: 0 2.5rem;
    }

    .proton-lead__title {
        font-size: 36px;
        /* ~36px */
    }

    .proton-content__heading {
        font-size: 1.8rem;
    }
}

/* Philosophy Section */
.philosophy-section {
    margin-top: 6rem;
    padding-bottom: 6rem;
}

.philosophy-intro {
    text-align: left;
    margin-bottom: 4rem;
}

.philosophy-intro__title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    font-family: var(--font-serif);
}

.philosophy-intro__lead {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.8;
    font-size: 18px;
    font-family: var(--font-serif);
    text-align: left;
}

.philosophy-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.philosophy-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.philosophy-card__icon-wrap {
    margin-bottom: 2.5rem;
    width: 200px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.philosophy-svg {
    width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

.philosophy-card__title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-serif);
    color: #333;
}

.philosophy-card__text {
    max-width: 580px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    text-align: left;
    font-family: var(--font-serif);
}

.philosophy-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    text-align: left;
    display: inline-block;
}

.philosophy-list li {
    margin-bottom: 17px;
    font-size: 1rem;
}

.philosophy-list strong {
    color: #333;
}

@media (min-width: 1024px) {
    .philosophy-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .philosophy-intro__title {
        font-size: 36px;
    }

    .philosophy-card {
        padding: 1rem 3rem;
    }

    .philosophy-card__title {
        min-height: 108px;
    }
}

/* 仕組み解説セクション */
.mechanism-section {
    margin-top: 55px;
    text-align: center;
}

.mechanism-banner {
    background-color: var(--color-brand);
    color: #fff;
    padding: 1.25rem;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 3rem;
    border-radius: 4px;
}

.mechanism-before {
    margin-bottom: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
}

.mechanism-before__label {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: #0f172a;
    flex-shrink: 0;
}

.mechanism-before__diagram svg,
.mechanism-before__diagram img {
    display: block;
}

.mechanism-comparison {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 4rem;
}

.mechanism-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.mechanism-card__header {
    padding: 1rem 1rem 2rem;
    font-family: var(--font-serif);
    font-weight: 700;
    color: #fff;
    font-size: 1.2rem;
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 50% 100%, 0% 75%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mechanism-card__header--grey {
    background-color: #707070
}

.mechanism-card__header--red {
    background-color: var(--color-brand);
}

.mechanism-card__body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    align-items: center;
    position: relative;
    min-height: 200px;
}

.mechanism-card__img-wrap {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
}

.mechanism-card__img-wrap--damaged {
    filter: grayscale(30%) brightness(0.9);
}

.mechanism-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mechanism-card__diagram {
    flex-shrink: 0;
    width: 190px;
}

.mechanism-card__diagram svg,
.mechanism-card__diagram img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.2);
    transform-origin: right center;
}

.mechanism-card__text {
    font-family: var(--font-serif);
    font-size: 0.7rem;
    line-height: 1.6;
    color: #334155;
    padding: 1.25rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 10.5rem;
    right: -3rem;
    z-index: 20;
    text-align: justify;
}

.mechanism-footer {
    height: 60px;
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 50% 100%, 0% 70%);
}

.mechanism-footer--grey {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #64748b 100%);
}

.mechanism-footer--red {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--color-brand) 100%);
}

.mechanism-footer__label {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1024px) {
    .mechanism-comparison {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 11rem;
    }
}

.thaw-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.thaw-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
    font-family: var(--font-serif);
    color: #0f172a;
    text-align: left;
}

/* Timeline wrapper - the vertical red line */
.thaw-timeline {
    position: relative;
    padding-left: 3rem;
}

/* Removed global line to use per-step lines */
.thaw-timeline {
    position: relative;
    padding-left: 3rem;
}

/* Each step row */
.thaw-step {
    position: relative;
    display: flex;
    flex-direction: row;
    margin-bottom: 4rem;
    gap: 0;
}

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

/* The column that sits ON the line (circle only) */
.thaw-step__line-node {
    position: absolute;
    left: -3rem;
    top: 0.35rem;
    bottom: -4.35rem;
    /* Reach exactly to the next step's circle */
    width: 1.5rem;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.thaw-step__line-node::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 1.5rem;
    /* Start just below the circle (1.5rem height) */
    bottom: 0;
    width: 3px;
    background-color: var(--color-brand);
    z-index: -1;
}

.thaw-step:last-child .thaw-step__line-node::before {
    display: none;
}

.thaw-step__circle {
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--color-brand);
    border-radius: 50%;
    flex-shrink: 0;
}

/* The main inner content block */
.thaw-step__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Row: big number + heading side by side */
.thaw-step__head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.thaw-step__number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-serif);
    line-height: 1;
    flex-shrink: 0;
}

.thaw-step__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    font-family: var(--font-serif);
    margin: 0;
}

/* Row: text left, images right */
.thaw-step__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.thaw-step__body--stacked {
    flex-direction: column !important;
    gap: 2rem;
}

.thaw-step__sub-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.thaw-step__texts {
    flex: 1;
}

.thaw-step__desc {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 0.75rem;
    text-align: left;
}

.thaw-step__desc:last-child {
    margin-bottom: 0;
}

.thaw-step__images {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
}

.thaw-step__img-wrap {
    width: 220px;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thaw-step__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .thaw-step__body {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }

    .thaw-step__sub-row {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
        width: 100%;
    }

    .thaw-step__texts {
        max-width: 360px;
    }

    .thaw-step__images {
        flex-direction: column;
    }

    .thaw-step__img-wrap {
        width: 260px;
    }
}

/* =============================================================================
 * Mobile Responsive (≤ 767px)
 * ============================================================================= */
@media (max-width: 767px) {

    /* ── Hero Lead ── */
    .proton-section {
        padding-top: 3rem;
    }

    .proton-container {
        padding: 0 1.25rem;
    }

    .proton-lead {
        margin-top: 2.5rem;
        margin-bottom: 2rem;
    }

    .proton-lead__title {
        font-size: 21px;
        line-height: 1.5;
    }

    .proton-lead__text {
        font-size: 14px;
        line-height: 2;
    }

    .proton-content {
        margin-top: 2rem;
    }

    .proton-content__heading {
        font-size: 21px;
        margin-bottom: 1rem;
    }

    .proton-content__text {
        font-size: 14px;
        line-height: 2;
    }

    /* ── Philosophy Section ── */
    .philosophy-section {
        margin-top: 3rem;
        padding-bottom: 3rem;
    }

    .philosophy-intro {
        margin-bottom: 2rem;
    }

    .philosophy-intro__title {
        font-size: 21px;
        margin-bottom: 1rem;
    }

    .philosophy-intro__lead {
        font-size: 14px;
    }

    .philosophy-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }

    .philosophy-card__icon-wrap {
        width: 140px;
        height: 105px;
        margin-bottom: 1.5rem;
    }

    .philosophy-card__title {
        font-size: 21px;
        margin-bottom: 1rem;
    }

    .philosophy-card__text {
        font-size: 14px;
        line-height: 1.8;
    }

    .philosophy-list li {
        font-size: 14px;
        margin-bottom: 0.75rem;
    }

    /* ── Mechanism Section ── */
    .mechanism-section {
        margin-top: 3rem;
    }

    .mechanism-banner {
        font-size: 1.2rem;
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .mechanism-before {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .mechanism-before__label {
        font-size: 1.2rem;
    }

    .mechanism-before__diagram svg,
    .mechanism-before__diagram img {
        width: 100%;
        max-width: 280px;
        height: auto;
    }

    .mechanism-comparison {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }

    .mechanism-card__body {
        flex-direction: column;
        align-items: center;
        min-height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .mechanism-card__diagram {
        width: 100%;
        max-width: 200px;
    }

    .mechanism-card__text {
        position: static;
        padding: 0.75rem 0 0;
        font-size: 14px;
        text-align: left;
    }

    /* ── Thaw / Timeline Section ── */
    .thaw-section {
        padding: 0 1.25rem;
    }

    .thaw-title {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .thaw-timeline {
        padding-left: 2.25rem;
    }

    .thaw-step {
        margin-bottom: 3rem;
    }

    .thaw-step__line-node {
        left: -2.25rem;
    }

    .thaw-step__number {
        font-size: 1.8rem;
    }

    .thaw-step__heading {
        font-size: 1.2rem;
    }

    .thaw-step__body {
        flex-direction: column;
        gap: 1rem;
    }

    .thaw-step__desc {
        font-size: 14px;
        line-height: 1.8;
    }

    .thaw-step__images {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .thaw-step__img-wrap {
        width: calc(50% - 0.375rem);
    }
}