/* ==============================================
   レスポンシブデザイン - メディアクエリ
   ============================================== */

/* Large Desktop (1200px以上) */
@media screen and (max-width: 1200px) {
    .contact-section,
    .example-section,
    .lead-section {
        padding-left: 82px;
        padding-right: 82px;
        box-sizing: border-box;
    }
    
    .contact-section {
        gap: 57px;
        padding-left: 81px;
        padding-right: 81px;
    }
    
    .example-section__text {
        margin-right: 40px;
    }
}

/* Desktop (1050px以下) */
@media screen and (max-width: 1050px) {
    .header {
        padding-left: 82px;
        padding-right: 82px;
        box-sizing: border-box;
    }
    
    .hero__title {
        font-size: 58px;
    }
    
    .lead-section__title,
    .initiative-section__title,
    .service-section__title {
        font-size: 29px;
    }
    
    .number-display {
        font-size: 50px;
    }
    
    .contact-section__title {
        font-size: 29px;
    }
}

/* Tablet & Mobile (820px以下) */
@media screen and (max-width: 820px) {
    /* ナビゲーション非表示 */
    .header__nav-menu {
        display: none;
    }
    
    .header {
        width: 100%;
    }
    
    /* ヒーローセクション */
    .hero {
        gap: 75px;
        padding-left: var(--padding-40);
        padding-right: var(--padding-40);
        box-sizing: border-box;
        height: auto;
        min-height: 400px;
    }
    
    .hero__text-container {
        height: auto;
        min-height: 300px;
        padding: 40px 0;
    }
    
    /* セクション共通調整 */
    .initiative-section,
    .lead-section {
        padding: 61px 41px;
        box-sizing: border-box;
    }
    
    /* リードセクション */
    .lead-section {
        flex-direction: column;
        align-items: center;
    }
    
    .lead-section__text {
        order: 2;
        width: 100%;
        max-width: none;
        align-items: center;
    }

    .lead-section__title,
    .lead-section__description {
        text-align: center;
    }
    
    .lead-section__image {
        order: 1;
        width: 100%;
        max-width: none;
        margin-bottom: 20px;
    }
    
    /* 取り組みセクション */
    .initiative-section {
        gap: 15px;
        padding: 41px; /* 左右の余白を調整 */
    }
    
    .initiative-section__title {
        margin-bottom: 15px;
    }
    
    .initiative-section__grid {
        flex-direction: column;
        align-items: center;
        margin-top: 5px;
        width: 100%; /* 全幅を確保 */
    }
    
    .initiative-card {
        width: 100%;
        max-width: 350px;
    }

    .initiative-card__image {
        width: 100%;
    }
    
    .initiative-section__link {
        display: none;
    }
    
    .initiative-card__mobile-link {
        display: block !important;
    }
    
    /* サービスセクション */
    .service-section {
        gap: 40px;
        padding: 40px 20px;
    }

    .service-section__grid,
    .service-section__column {
        flex-direction: column;
        height: auto;
        gap: 30px;
        align-items: center;
        width: 100%;
    }
    
    .service-card {
        width: 100%;
        max-width: 300px;
        height: auto;
        min-height: 200px;
    }
    
    .service-card__content {
        width: 100%;
        height: auto;
        min-height: 83px;
        gap: 6px;
    }
    
    /* 実例セクション */
    .example-section {
        padding: 75px 41px;
        box-sizing: border-box;
        flex-direction: column;
        text-align: center;
        gap: 40px;
        align-items: center;
    }
    
    .example-section__text {
        width: 100%;
        max-width: none;
        margin-bottom: 20px;
        order: 1;
        margin-right: 0;
    }
   
    .example-section__image-container {
        order: 2;
        margin-top: 20px;
    }

    .example-section__image {
        height: 259px;
    }
   
    .example-section__notice {
        margin-top: 0;
    }
   
    .example-section__status h3 {
        font-size: 20px;
    }
   
    .example-section__logo {
        width: 100%;
        max-width: 275px;
        height: auto;
        margin: 15px auto;
    }
    
    .example-section__message {
        order: 3;
        width: 100%;
        margin-top: 30px;
    }
   
    .message__title,
    .message__body {
        font-size: 16px;
    }
   
    /* お問合せセクション */
    .contact-section {
        gap: 0;
        padding: 60px var(--padding-40);
        box-sizing: border-box;
        flex-direction: column;
        height: auto;
        align-items: center;
    }
    
    .contact-section__text {
        padding: 0;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .contact-section__title {
        height: auto;
        margin-bottom: 10px;
    }
    
    .contact-section__description {
        text-align: center;
    }
    
    .form {
        width: 100%;
        max-width: 540px;
        padding: 0;
        align-items: center;
    }
    
    .form__name-group {
        gap: 16px;
        flex-direction: column;
        height: auto;
    }
    
    .form__name-field {
        max-width: none;
        width: 100%;
        padding: 0 31px;
        margin: 2px 0;
    }
    
    .form__name-container {
        height: auto;
        overflow: visible;
        padding-top: 5px;
    }
    
    .btn-submit {
        align-self: center;
        margin: 0 auto;
    }
    
    .form__grid,
    .form__field {
        width: 100%;
        max-width: 100%;
    }
    
    /* フッター */
    .footer {
        gap: 30px;
        height: auto;
        flex-direction: column;
        align-items: center;
    }
    
    .footer__content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .footer__address, 
    .footer__service {
        flex: 1;
        min-width: 120px;
        text-align: left;
    }
    
    .footer__logo {
        width: 100%;
        max-width: 200px;
        text-align: center;
        margin: 0 auto;
        display: block;
    }

    /* コラムセクション */
    .column-section {
        flex-direction: column;
        padding: 61px 41px;
        gap: 30px;
    }
    
    .column-section__left,
    .column-section__right {
        flex: 1 1 100%;
        width: 100%;
        text-align: center;
    }
    
    .column-section__title {
        justify-content: center;
        width: 100%;
    }
}

/* Mobile (450px以下) */
@media screen and (max-width: 450px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--padding-20);
    }
    
    .hero__title {
        font-size: 43px;
    }
    
    .hero__subtitle {
        font-size: var(--font-size-19);
    }
    
    .hero {
        gap: 19px;
        padding-left: var(--padding-20);
        padding-right: var(--padding-20);
    }
    
    .lead-section__text {
        gap: var(--gap-19);
    }
    
    .lead-section,
    .initiative-section,
    .service-section,
    .example-section,
    .contact-section {
        padding: var(--padding-19) var(--padding-20);
        gap: var(--gap-19);
    }
    
    .initiative-section__grid,
    .service-section__grid,
    .form {
        gap: var(--gap-19);
    }
    
    .landing-page {
        gap: var(--gap-19);
    }
}

/* Extra Small Mobile (430px以下) */
@media screen and (max-width: 430px) {
    .initiative-section__title {
        line-height: 1.4;
        word-spacing: 0.1em;
        margin-bottom: 50px;
    }
    
    .initiative-section__grid {
        margin-top: 40px;
    }
}

/* iPhone 16対応 (395px以下) */
@media screen and (max-width: 395px) {
    .footer__content {
        justify-content: flex-start;
        gap: 8px;
        padding: 0 5px;
    }
    
    .footer__address {
        flex: 0 0 90px;
        min-width: 90px;
    }
    
    .footer__service {
        flex: 1;
        min-width: 80px;
        padding-left: 5px;
    }
}

/* Ultra Small Mobile (390px以下) - iPhone 15対応 */
@media screen and (max-width: 390px) {
    .footer__content {
        justify-content: flex-start;
        gap: 6px;
        padding: 0 3px;
    }
    
    .footer__address {
        flex: 0 0 80px;
        min-width: 80px;
    }
    
    .footer__service {
        flex: 1;
        min-width: 70px;
        padding-left: 3px;
    }
    
    .footer__service-links {
        font-size: 10px;
        line-height: 140%;
    }
}

/* Compact Mobile (360px以下) */
@media screen and (max-width: 360px) {
    .footer__content {
        padding: 0 5px;
        gap: 4px;
    }
    
    .footer__service {
        padding-right: 10px;
        min-width: 90px;
    }
    
    .footer__service-links {
        font-size: 9px;
        line-height: 130%;
    }
}

/* Minimal Mobile (320px以下) - iPhone SE対応 */
@media screen and (max-width: 320px) {
    .footer__content {
        padding: 0 5px;
        gap: 10px;
        flex-direction: column;
        text-align: center;
    }
    
    .footer__service {
        padding-right: 5px;
        text-align: center;
        width: 100%;
    }
    
    .footer__service-links {
        font-size: 9px;
        line-height: 130%;
        text-align: center;
    }
    
    .footer__address,
    .footer__service {
        min-width: auto;
        width: 100%;
        margin-bottom: 10px;
    }
}
