/* ============================================
   Mobile Responsive Styles (max-width: 640px)
   ============================================ */
@media (max-width: 640px) {
    .hero {
        padding: 2rem 0 2rem 0;
    }

    .nav-menu {
        width: 100%;
        padding: 5rem 0 5rem 0;
    }

    .nav-menu .nav-contact .contact-cta-button {
        width: 100%;
        text-align: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: initial;
        padding-bottom: 1.5rem;
        flex-direction: column;
        align-items: center;
    }

    .hero-desktop-image {
        display: none;
    }

    .hero-mobile-image {
        display: block;
        max-width: 100%;
        padding: 0 1rem;
    }

    .hero-text {
        display: none;
    }

    .hero-text-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 2rem;
    }

    .mobile-text-small {
        font-size: 0.9rem;
        font-weight: 500;
        margin: 0;
        line-height: 1.5;
    }

    .mobile-text-large {
        font-size: 1.3rem;
        font-weight: 700;
        margin: 0;
        line-height: 1.5;
    }

    .section-title,
    .section-title-main {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .section-title-underline {
        max-width: 200px;
    }

    .handwriting-title {
        font-size: 1.8rem;
    }

    .column-card {
        flex: 0 0 220px;
        min-width: 220px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 4rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .floating-contact-button {
        width: 90px;
        height: 90px;
        font-size: 0.9rem;
        bottom: 1rem;
        right: 1rem;
    }

    .concerns-title {
        font-size: 1.5rem;
    }

    /* モバイル用背景画像 */
    .concerns .container {
        background-image: url('../../image/concerns/sp-background.png');
        background-size: 100% 750px;
        height: auto;
        min-height: 400px;
        padding: 2rem 1rem;
    }

    .speech-mobile.speech-1 {
        left: calc(50% - 2rem);
        width: 60%;
    }

    .speech-mobile.speech-2 {
        left: calc(50% - 12rem);
        width: 60%;
    }

    .speech-mobile.speech-3 {
        left: calc(50% - 2rem);
        width: 60%;
    }

    .speech-mobile.speech-4 {
        left: calc(50% - 12rem);
        width: 60%;
    }

    .speech-mobile.speech-5 {
        left: calc(50% - 2rem);
        width: 60%;
    }

    .handwriting-title-1 {
        font-size: 1rem;
    }

    .handwriting-title-2-wrapper {
        gap: initial;
    }
    .handwriting-title-2 {
        font-size: 1.3rem;
    }

    .decoration-mark {
        background-size: auto 70%;
    }

    .representative-description {
        order: 3;
    }

    .representative-description p {
        font-size: 0.9rem;
        line-height: 1.8;
    }

    .representative-description span {
        color: var(--accent-orange);
    }

    .representative-card {
        padding: 2rem;
        background-image: url('../../image/about/sp-flame.png');
    }

    .representative-content {
        display: flex;
        flex-direction: column;
    }

    .representative-image {
        margin: auto;
        order: 1;
        align-items: center;
    }

    .representative-title {
        order: 2;
        width: 100%;
        text-align: center;
        margin: 2rem 0 1rem 0;
    }

    .representative-title h3 {
        font-size: 1.5rem;
    }

    .title-underline {
        max-width: 100%;
        margin: 0 auto;
    }

    .title-underline-top {
        display: block;
        margin-bottom: 0.5rem;
    }

    .manager-photo {
        width: 180px;
        height: 180px;
    }

    .manager-portrait {
        width: 150px;
        height: 150px;
    }

    .manager-title {
        font-size: 16px;
        letter-spacing: 4px;
    }

    .about-background {
        background-image: url('../../image/about/sp-background.png');
    }

    .feature-item {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .feature-illustration {
        order: 1;
        width: 100%;
    }

    .feature-illustration img {
        max-width: 250px;
        margin: 0 auto;
    }

    .feature-content {
        order: 2;
        text-align: center;
    }

    .feature-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .feature-subtitle {
        font-size: 1rem;
        color: var(--accent-orange);
    }
    
    .feature-description {
        font-size: 0;
        text-align: left;
    }

    .feature-description p {
        display: inline;
        font-size: 0.85rem;
        line-height: 1.8;
    }

    .office-info-card {
        background-image: url('../../image/overview/sp-background.png');
        padding: 3rem 1rem;
        display: block;
    }
    
    .office-illustration {
        display: block;
    }

    .office-illustration {
        width: 70%;
        margin: auto;
    }

    .office-details h2 {
        text-align: center;   
    }
    .office-title-underline {
        margin-bottom: 1rem;
    }

    .office-info-table th {
        font-size: 0.9rem;
    }

    .office-info-table td {
        font-size: 0.8rem;
    }
    .footer {
        padding: 1.5rem 0;
    }
    .footer-title {
        margin-bottom: 1rem;
    }
    .footer-content {
        display: block;
        justify-items: normal;
    }

    .footer-center {
        align-items: normal;
        gap: initial;
    }

    .footer-illustration {
        display: block;
        text-align: center;
    }

    .footer-illustration-left,
    .footer-illustration-right {
        display: none;
    }

    .footer-human-img {
        width: 80px;
        display: inline-block;
        margin: 0 1rem;
    }

    .footer-column ul {
        align-items: normal;
        gap: initial;
    }

    /* すべての li の上に線を引く */
    .footer-column li {
        border-top: solid 0.1rem var(--border-white);
    }

    /* 一番最後の「列（column）」の、一番最後の「li」にだけ、仕上げの下線を引く */
    .footer-column:last-child li:last-child {
        border-bottom: solid 0.1rem var(--border-white);
    }

    .footer-column a {
        padding: 0.8rem 0;
    }
    

    .footer-links {
        gap: initial;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-icon {
        display: inline;
        right: 2rem;
    }

    .btn-option {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}