/* =========================================
   基本設定・共通スタイル
   ========================================= */
:root {
    --primary-color: #C7CEFF; /* パステルパープル */
    --accent-color: #FFC1CC;  /* パステルピンク */
    --yellow-color: #FFF4BD;  /* パステルイエロー */
    --text-color: #333333;
    --bg-color: #F0F8FF;      /* 全体の背景色（薄い空色） */
    --card-bg: #ffffff;
    --border-radius-L: 30px;
    --border-radius-M: 20px;
    --border-radius-S: 12px;
    --box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; } /* HTMLにも高さを指定 */

body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* フッター固定のためのFlexbox設定 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%; /* 【修正】幅を明示的に指定 */
}

/* コンテナ（共通の幅設定） */
.container {
    width: 100%; /* 【修正】親要素に対して100%の幅を確保 */
    max-width: 1200px; /* 最大幅は1200pxに制限 */
    margin: 0 auto;    /* 中央揃え */
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* メインコンテンツを包むコンテナ（フッターを押し下げる用） */
.main-container {
    flex: 1 0 auto; /* 縦方向に伸びる設定（IE11などへの対策で少し詳細に記述） */
}


.card-ui { background: var(--card-bg); border-radius: var(--border-radius-L); box-shadow: var(--box-shadow); padding: 40px; margin-bottom: 30px; position: relative; }
.text-center { text-align: center; }

/* ボタン */
.btn { padding: 10px 24px; border: none; border-radius: 50px; font-family: inherit; font-weight: 700; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; display: inline-block; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-accent { background-color: var(--accent-color); color: #fff; }
.btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-large { padding: 14px 40px; font-size: 1.1rem; }
.btn-full { width: 100%; text-align: center; }

/* ヘッダー */
.main-header { display: flex; align-items: center; justify-content: space-between; background: var(--card-bg); padding: 15px 30px; border-radius: var(--border-radius-L); box-shadow: var(--box-shadow); margin-bottom: 40px; position: relative; }
.logo { display: flex; align-items: center; font-weight: 800; font-size: 1.2rem; z-index: 101; text-decoration: none; color: var(--text-color); }
.logo img { margin-right: 10px; border-radius: 50%; }
.nav-wrapper { display: flex; align-items: center; gap: 30px; }
.main-nav ul { display: flex; list-style: none; gap: 30px; }
.main-nav a { text-decoration: none; color: var(--text-color); font-weight: 700; transition: color 0.2s; }
.main-nav a.active, .main-nav a:hover { color: var(--primary-color); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; width: 30px; height: 24px; position: relative; z-index: 101; }
.hamburger-btn span { position: absolute; left: 0; width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; transition: all 0.3s ease; }
.hamburger-btn span:nth-child(1) { top: 0; } .hamburger-btn span:nth-child(2) { top: 50%; transform: translateY(-50%); } .hamburger-btn span:nth-child(3) { bottom: 0; }
.hamburger-btn.is-active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-btn.is-active span:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* 装飾要素 */
.bubble { position: absolute; background: #fff; border-radius: 50%; box-shadow: 0 4px 8px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; font-weight: bold; animation: float 3s ease-in-out infinite; }
.bubble-1 { width: 60px; height: 60px; top: -20px; right: 10%; } .bubble-2 { width: 40px; height: 40px; bottom: 10px; left: 15%; animation-delay: 1s; } .bubble-small { width: 40px; height: 40px; font-size: 1.2rem; } .bubble-top-left { top: -15px; left: -15px; } .bubble-top-right { top: -15px; right: -15px; background: var(--yellow-color); color: var(--text-color); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.bg-decoration { position: absolute; z-index: 0; border-radius: 50%; filter: blur(20px); opacity: 0.6; pointer-events: none; }
.cloud-1 { width: 300px; height: 300px; background: #ffffff; top: -50px; left: -50px; } .cloud-2 { width: 250px; height: 250px; background: #ffffff; bottom: 50px; right: -50px; }
.rainbow { width: 800px; height: 800px; background: radial-gradient(circle at bottom right, transparent 40%, var(--accent-color) 40%, var(--accent-color) 50%, var(--yellow-color) 50%, var(--yellow-color) 60%, var(--primary-color) 60%, var(--primary-color) 70%, transparent 70%); bottom: -200px; right: -200px; opacity: 0.3; }

/* =========================================
   トップページ用スタイル
   ========================================= */
.hero-section h1 { font-size: 2.5rem; margin-bottom: 15px; }
.hero-section p { margin-bottom: 30px; color: #666; }
.hero-illustration { position: relative; margin-bottom: 30px; display: inline-block; }
.hero-illustration img { max-width: 100%; height: auto; border-radius: var(--border-radius-M); }
.feature-row { display: flex; gap: 30px; }
.feature-card { flex: 1; } .feature-card h2 { margin-bottom: 15px; }
.process-illustration img { width: 100%; height: auto; border-radius: var(--border-radius-M); margin-top: 20px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; }
.mini-card { background: #fff; padding: 20px; border-radius: var(--border-radius-M); display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: transform 0.2s; }
.mini-card:hover { transform: translateY(-3px); }
.mini-card img { width: 60px; height: 60px; border-radius: 15px; margin-bottom: 10px; }
.mini-card span { font-weight: 700; font-size: 0.9rem; }
.card-pink img { background-color: var(--accent-color); } .card-yellow img { background-color: var(--yellow-color); } .card-blue img { background-color: var(--primary-color); } .card-purple img { background-color: #E0BBE4; }

/* =========================================
   下層ページ共通スタイル
   ========================================= */
.page-hero {
    text-align: center; padding: 40px 0 60px;
}
.page-hero h1 { font-size: 2.8rem; margin-bottom: 10px; position: relative; display: inline-block;}
.page-hero h1::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 80px; height: 6px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 12"><path d="M0,6 C10,0 20,0 30,6 C40,12 50,12 60,6 C70,0 80,0 90,6 C100,12 110,12 120,6" fill="none" stroke="%23FFC1CC" stroke-width="4"/></svg>') repeat-x; }
.page-hero p { color: #777; max-width: 600px; margin: 20px auto 0; }

/* =========================================
   機能紹介ページ (features.html) 用
   ========================================= */
.feature-detail-section { display: flex; align-items: center; gap: 50px; padding: 60px 0; }
.feature-detail-section.reverse-layout { flex-direction: row-reverse; }
.feature-text { flex: 1; }
.feature-text h2 { font-size: 2rem; margin-bottom: 20px; color: var(--primary-color); }
.feature-text p { margin-bottom: 20px; color: #555; }
.feature-text ul { list-style: none; margin-bottom: 30px; }
.feature-text li { margin-bottom: 10px; padding-left: 25px; position: relative; }
.feature-text li::before { content: '✔'; position: absolute; left: 0; color: var(--accent-color); font-weight: bold; }
.feature-image { flex: 1; display: flex; justify-content: center; }
.feature-image img { max-width: 100%; height: auto; border-radius: var(--border-radius-L); box-shadow: var(--box-shadow); }

/* =========================================
   料金プランページ (pricing.html) 用
   ========================================= */
.pricing-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px;
    align-items: flex-start;
}
.pricing-card {
    background: #fff; border-radius: var(--border-radius-L); padding: 40px;
    text-align: center; transition: transform 0.3s, box-shadow 0.3s; border: 3px solid transparent;
}
.pricing-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.pricing-card.popular-plan {
    border-color: var(--accent-color); position: relative; background: #fff5f7; transform: scale(1.05); z-index: 1;
}
.popular-badge { position: absolute; top: -15px; right: 20px; background: var(--accent-color); color: #fff; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; }
.plan-name { font-size: 1.5rem; margin-bottom: 15px; font-weight: 800; }
.plan-price { margin-bottom: 25px; }
.plan-price .currency { font-size: 1.2rem; vertical-align: top; }
.plan-price .amount { font-size: 3.5rem; font-weight: 800; color: var(--primary-color); line-height: 1; }
.plan-price .period { color: #888; font-size: 0.9rem; }
.plan-features { list-style: none; margin-bottom: 30px; text-align: left; display: inline-block;}
.plan-features li { margin-bottom: 12px; padding-left: 25px; position: relative; color: #555; }
.plan-features li::before { content: '●'; color: var(--yellow-color); position: absolute; left: 0; font-size: 0.8rem; top: 5px; }
.popular-plan .plan-features li::before { color: var(--accent-color); }

/* =========================================
   共通フッター
   ========================================= */
.main-footer {
    flex-shrink: 0; /* フッターが縮まないようにする */
    background: var(--card-bg); padding: 50px 0 20px;
    border-top-left-radius: var(--border-radius-L); border-top-right-radius: var(--border-radius-L);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.03); margin-top: 60px; z-index: 2; position: relative;
}
.footer-content { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.footer-info p { margin-top: 15px; color: #666; font-size: 0.9rem; }
.footer-links h3 { font-size: 1.1rem; margin-bottom: 20px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { text-decoration: none; color: #555; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-color); }
.copyright { text-align: center; padding-top: 20px; border-top: 1px solid #eee; color: #888; font-size: 0.8rem; }

/* =========================================
   レスポンシブ対応
   ========================================= */
@media (max-width: 768px) {
    .hamburger-btn { display: block; }
    .nav-wrapper { position: absolute; top: 100%; left: 0; width: 100%; background: var(--card-bg); border-radius: var(--border-radius-M); box-shadow: var(--box-shadow); flex-direction: column; padding: 30px; gap: 25px; opacity: 0; visibility: hidden; transform: translateY(-20px); transition: all 0.3s ease-in-out; z-index: 100; }
    .nav-wrapper.is-active { opacity: 1; visibility: visible; transform: translateY(10px); }
    .main-nav ul { flex-direction: column; align-items: center; gap: 20px; }
    .main-nav a { font-size: 1.1rem; display: block; padding: 5px; }
    .header-actions { flex-direction: column; width: 100%; }
    .search-bar { display: none; }
    
    .hero-section h1 { font-size: 1.8rem; }
    .feature-row { flex-direction: column; }
    .bubble { display: none; }
    .bg-decoration { opacity: 0.3; }
    .card-ui { padding: 30px 20px; }
    
    .page-hero h1 { font-size: 2rem; }
    .feature-detail-section, .feature-detail-section.reverse-layout { flex-direction: column; gap: 30px; padding: 40px 0; }
    .feature-image { order: -1; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 40px auto 0; }
    .pricing-card.popular-plan { transform: scale(1); }
    .footer-content { flex-direction: column; text-align: center; gap: 30px; }
    .logo { justify-content: center; }
}

/* =========================================
   【新規】導入事例ページ (cases.html) 用
   ========================================= */
.case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列配置 */
    gap: 30px;
    margin-top: 40px;
}
.case-card {
    background: #fff;
    border-radius: var(--border-radius-M);
    overflow: hidden; /* 画像の角丸用 */
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none; /* リンクの下線を消す */
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}
.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}
.case-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}
.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像の比率を維持してトリミング */
    transition: transform 0.3s;
}
.case-card:hover .case-image img {
    transform: scale(1.05); /* ホバーで画像が少し拡大 */
}
.case-content {
    padding: 25px;
    flex-grow: 1; /* コンテンツ領域を引き伸ばす */
    display: flex;
    flex-direction: column;
}
.case-client {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}
.case-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--primary-color);
}
.case-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}
.case-link-text {
    font-weight: 700;
    color: var(--primary-color);
    align-self: flex-start; /* 左寄せ */
}

/* =========================================
   【新規】お問い合わせページ (contact.html) 用
   ========================================= */
.contact-form {
    max-width: 700px; /* フォームの幅を制限 */
    margin: 0 auto; /* 中央寄せ */
}
.form-group {
    margin-bottom: 25px;
}
.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
}
.form-required {
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-left: 5px;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: var(--border-radius-S);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f9f9f9;
    appearance: none; /* ブラウザ標準スタイルをリセット（特にセレクトボックス用） */
}
/* フォーカス時のスタイル */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(199, 206, 255, 0.2); /* primary-colorの薄い影 */
    background: #fff;
}
.form-textarea {
    resize: vertical; /* 縦方向のみリサイズ可能 */
    height: 150px;
}
/* セレクトボックスの矢印カスタマイズ（簡易版） */
.select-wrap {
    position: relative;
}
.select-wrap::after {
    content: '▼';
    font-size: 0.8rem;
    color: #888;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* クリックを透過させる */
}

/* =========================================
   【新規】サポートページ (support.html) 用
   ========================================= */
/* サポート検索バー（ヘッダーの検索バーとは別デザイン） */
.support-search {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}
.support-search input {
    width: 100%;
    padding: 20px 20px 20px 50px;
    border: none;
    border-radius: 50px;
    box-shadow: var(--box-shadow);
    font-size: 1.1rem;
    font-family: inherit;
}
.support-search .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #aaa;
}

/* カテゴリグリッド（機能ページのmini-cardを応用） */
.support-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4列 */
    gap: 20px;
    margin-bottom: 50px;
}
.category-card {
    text-decoration: none;
    color: var(--text-color);
    /* mini-cardのスタイルを継承しつつ調整 */
    background: #fff; padding: 25px; border-radius: var(--border-radius-M); display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: transform 0.2s;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.05); color: var(--primary-color); }
.category-card .icon-box {
    width: 70px; height: 70px; border-radius: 20px; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff;
}
.category-card h3 { font-size: 1rem; }

/* よくある質問リスト */
.qa-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}
.qa-list {
    max-width: 800px;
    margin: 0 auto;
    list-style: none;
}
.qa-item {
    background: #fff;
    border-radius: var(--border-radius-M);
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.qa-question {
    display: block;
    padding: 20px 25px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    transition: color 0.2s;
}
.qa-question:hover {
    color: var(--primary-color);
}
.qa-question::before {
    content: 'Q.';
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2rem;
}
/* 簡易的な矢印 */
.qa-question::after {
    content: '›';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg); /* 下向きにする */
    font-size: 1.5rem;
    color: #ccc;
}

/* =========================================
   レスポンシブ対応の追加分
   ========================================= */
@media (max-width: 768px) {
    /* 導入事例：1列表示 */
    .case-grid { grid-template-columns: 1fr; }
    .case-image { height: 180px; }
    
    /* サポート：カテゴリ2列表示 */
    .support-categories { grid-template-columns: repeat(2, 1fr); }
    .support-search input { padding: 15px 15px 15px 45px; font-size: 1rem; }
}
@media (max-width: 480px) {
    /* スマホの狭い画面ではカテゴリも1列に */
    .support-categories { grid-template-columns: 1fr; }
}