/* 基本設定 - モバイルファースト */
:root {
    --color-primary: #003366; /* メインの濃い青 */
    --color-secondary: #4a90e2; /* やや明るい青 */
    --color-background: #f4f8ff; /* 薄い背景色 */
    --color-text: #333333;
    --color-white: #ffffff;
    --color-border: #e0e0e0;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding-top: 0;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--color-text);
    margin: 0;
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* コンテナ - モバイルファースト */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
}

/* 画像の基本設定 */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ボタン・リンクの基本設定 - タップしやすさ重視 */
button, .btn, .cta-btn, a.button, .support-card-button, .mission-button, .our-story-button {
    min-height: 48px;
    padding: 14px 20px;
    font-size: 1.1rem;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-weight: 500;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* テキストのはみ出し防止 */
p, h1, h2, h3, h4, h5, h6, span, div {
    overflow-wrap: break-word;
    word-break: break-all;
    max-width: 100%;
    margin: 0;
}

/* ヘッダー - モバイルファースト */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    height: 80px;
}

.header__inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.header__logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
}

.header__logo img {
    height: 60px;
    width: auto;
    vertical-align: middle;
    transition: all 0.3s;
    max-width: 100%;
}

.header__nav {
    display: none; /* モバイルではデフォルトで非表示 */
}

.header__nav.active {
    display: block; /* アクティブ時に表示 */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header__nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.header__nav li {
    border-bottom: 1px solid #f0f0f0;
}

.header__nav li:last-child {
    border-bottom: none;
}

.header__nav a {
    font-weight: 500;
    color: var(--color-primary) !important;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 16px 20px;
    display: block;
    width: 100%;
    text-align: left;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1.1rem;
}

.header__nav a:hover {
    background-color: #f8f9fa;
    color: var(--color-secondary) !important;
}

.header__toggle {
    display: block; /* モバイルでは表示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-height: 48px;
    width: 48px;
    position: relative;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.header__toggle:hover {
    background-color: #f8f9fa;
}

.header__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 5px auto;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.header__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__toggle.active span:nth-child(2) {
    opacity: 0;
}

.header__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* フッター - モバイルファースト */
.footer {
    background: #F5F1EA;
    color: var(--color-text);
    padding: 40px 0 20px 0;
}

.footer-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding-bottom: 40px;
}

.footer-left {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo img {
    height: 80px;
    max-width: 100%;
    width: auto;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.footer-nav-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.footer-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 8px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-nav a:hover {
    color: var(--color-secondary);
}

.footer-social {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-social a {
    color: var(--color-text);
    font-size: 1.5rem;
    transition: color 0.3s ease;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social a:hover {
    color: var(--color-secondary);
}

.footer-info {
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.7);
    width: 100%;
}

.footer-info p {
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-all;
}

.footer-bottom {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(0,0,0,0.6);
}

/* タブレット用スタイル */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
    
    .header__inner {
        padding: 0 24px;
    }
    
    .header__nav a {
        padding: 20px 24px;
        font-size: 1.2rem;
    }
    
    button, .btn, .cta-btn, a.button, .support-card-button, .mission-button, .our-story-button {
        min-height: 52px;
        padding: 16px 24px;
        font-size: 1.2rem;
    }
}

/* PC用スタイル */
@media (min-width: 769px) {
    body {
        padding-top: 100px;
    }

    .container {
        max-width: 1200px;
        padding: 0 24px;
    }

    button, .btn, .cta-btn, a.button, .support-card-button, .mission-button, .our-story-button {
        width: auto;
        min-width: 200px;
        min-height: 52px;
        padding: 16px 32px;
        font-size: 1.2rem;
    }

    .header {
        height: 100px;
    }

    .header__inner {
        height: 100px;
        padding: 0 24px;
    }

    .header__logo {
        flex: 1;
    }

    .header__logo img {
        height: 70px;
    }

    .header__nav {
        display: flex;
        flex: 1;
        justify-content: flex-end;
    }

    .header__nav ul {
        flex-direction: row;
        gap: 0;
        align-items: center;
    }

    .header__nav li {
        border-bottom: none;
    }

    .header__nav a {
        padding: 12px 20px;
        text-align: center;
        min-height: 44px;
        justify-content: center;
        font-size: 1rem;
        border-radius: 4px;
        margin: 0 4px;
    }

    .header__nav a:hover {
        background-color: #f8f9fa;
    }

    .header__toggle {
        display: none;
    }

    .footer-main {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 40px;
    }

    .footer-left {
        flex-shrink: 0;
    }

    .footer-logo img {
        height: 100px;
    }

    .footer-right {
        flex: 1;
        align-items: flex-end;
    }

    .footer-nav-container {
        justify-content: flex-end;
    }

    .footer-nav {
        flex-direction: row;
        gap: 24px;
        align-items: center;
    }

    .footer-nav a {
        padding: 8px 16px;
        min-height: 44px;
    }

    .footer-info {
        text-align: right;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* 大画面用スタイル */
@media (min-width: 1201px) {
    .container {
        max-width: 1400px;
        padding: 0 32px;
    }
    
    .header__inner {
        padding: 0 32px;
    }
}

/* 超小画面用スタイル */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .header__inner {
        padding: 0 12px;
    }
    
    .header__logo img {
        height: 50px;
    }
    
    button, .btn, .cta-btn, a.button, .support-card-button, .mission-button, .our-story-button {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 1rem;
    }
}

section, div, ul, li {
    box-sizing: border-box;
    max-width: 100vw;
    overflow-x: hidden;
}

.flex, [class*="flex"], .header__inner, .footer-main, .problem-cards, .recommend-cards, .flow-steps, .learn-grid, .deliverables-grid, .price-plans, .testimonial-cards, .cta-boxes, .mission-inner, .challenge-cards, .support-cards {
    min-width: 0;
}

/* モバイルファースト：縦並び・中央揃え */
.section-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.section-flex img,
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* 2カラム化（PC） */
@media (min-width: 768px) {
  .section-flex {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 48px;
  }
  .section-flex .section-image,
  .section-flex .section-content {
    flex: 1 1 0;
    max-width: 50%;
  }
  .section-flex .section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

/* スマホ対応 - 768px以下 */
@media screen and (max-width: 768px) {
    /* 基本設定 */
    html, body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* コンテナ */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* ヘッダー */
    .header {
        height: 70px;
    }
    
    .header__inner {
        height: 70px;
        padding: 0 16px;
    }
    
    .header__logo img {
        height: 50px;
    }
    
    .header__nav a {
        font-size: 16px;
        padding: 16px 20px;
        min-height: 48px;
    }
    
    /* ボタン・リンク */
    button, .btn, .cta-btn, a.button, .support-card-button, .mission-button, .our-story-button {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 16px;
        width: 100%;
    }
    
    /* フッター */
    .footer-main {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-left {
        order: 1;
    }
    
    .footer-right {
        order: 2;
        width: 100%;
    }
    
    .footer-nav-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-nav a {
        font-size: 16px;
        padding: 12px 0;
        min-height: 40px;
    }
    
    .footer-social {
        justify-content: center;
        gap: 20px;
    }
    
    .footer-social a {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .footer-info p {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    /* フレックスレイアウト */
    .flex, [class*="flex"], .header__inner, .footer-main, .problem-cards, .recommend-cards, .flow-steps, .learn-grid, .deliverables-grid, .price-plans, .testimonial-cards, .cta-boxes, .mission-inner, .challenge-cards, .support-cards {
        flex-direction: column;
    }
    
    .section-flex {
        flex-direction: column;
        gap: 30px;
    }
    
    .section-flex .section-image,
    .section-flex .section-content {
        width: 100%;
        order: 0;
    }
} 