/* 基本スタイル - テンプレートシステムと連携 */

/* リセットと基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary, 'Noto Sans JP', sans-serif);
    line-height: var(--line-height-base, 1.6);
    color: var(--text-primary, #333);
    font-size: var(--font-size-base, 16px);
    background-color: var(--bg-primary, #ffffff);
    transition: var(--transition-base, all 0.3s ease);
}

/* テーマ変数の適用 */
body[data-theme="corporate"] {
    --primary-color: #1e3a5f;
    --primary-dark: #2a4a73;
    --secondary-color: #5a6b8c;
    --accent-color: #3a7d5d;
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --border-color: #d1d5db;
    --shadow-light: rgba(30, 58, 95, 0.1);
    --shadow-medium: rgba(30, 58, 95, 0.18);
    --shadow-heavy: rgba(30, 58, 95, 0.25);
}

body[data-theme="tech"] {
    --primary-color: #1e3a5f;
    --primary-dark: #2a4a73;
    --secondary-color: #6b46c1;
    --accent-color: #2b6cb0;
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --bg-tertiary: #cbd5e1;
    --border-color: #94a3b8;
    --shadow-light: rgba(30, 58, 95, 0.15);
    --shadow-medium: rgba(30, 58, 95, 0.25);
    --shadow-heavy: rgba(30, 58, 95, 0.4);
}

body[data-theme="nature"] {
    --primary-color: #2f855a;
    --primary-dark: #3a9d6e;
    --secondary-color: #7c9a2a;
    --accent-color: #059669;
    --text-primary: #064e3b;
    --text-secondary: #166534;
    --bg-primary: #f0fdf4;
    --bg-secondary: #dcfce7;
    --bg-tertiary: #bbf7d0;
    --border-color: #86efac;
    --shadow-light: rgba(6, 95, 70, 0.15);
    --shadow-medium: rgba(6, 95, 70, 0.25);
    --shadow-heavy: rgba(6, 95, 70, 0.4);
}

body[data-theme="dark"] {
    --primary-color: #a0c8ff;
    --primary-dark: #7fb3ff;
    --secondary-color: #c4b5fd;
    --accent-color: #6ee7b7;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #475569;
    --shadow-light: rgba(160, 200, 255, 0.3);
    --shadow-medium: rgba(160, 200, 255, 0.4);
    --shadow-heavy: rgba(160, 200, 255, 0.6);
}

/* レイアウト変数の適用 */
body[data-layout="modern"] {
    --container-width: 1200px;
    --section-padding: 80px 0;
    --card-radius: 16px;
    --button-radius: 8px;
    --input-radius: 8px;
    --spacing-unit: 1rem;
}

body[data-layout="classic"] {
    --container-width: 1140px;
    --section-padding: 100px 0;
    --card-radius: 8px;
    --button-radius: 4px;
    --input-radius: 4px;
    --spacing-unit: 1.2rem;
}

body[data-layout="minimal"] {
    --container-width: 1000px;
    --section-padding: 60px 0;
    --card-radius: 0px;
    --button-radius: 0px;
    --input-radius: 0px;
    --spacing-unit: 0.8rem;
}

/* コンテナ */
.container {
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 var(--spacing-unit, 20px);
}

/* ヘッダー（テンプレート対応） */
.header {
    background: var(--bg-primary, #fff);
    box-shadow: 0 2px 10px var(--shadow-light, rgba(0,0,0,0.1));
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color, #2563eb);
}

.logo span {
    color: var(--primary-dark, #1e40af);
    font-size: 1.2rem;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-primary, #333);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-list a:hover {
    color: var(--primary-color, #2563eb);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color, #2563eb);
    transition: width 0.3s ease;
}

.nav-list a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary, #333);
}

/* ヒーローセクション（テンプレート対応） */
.hero-template {
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary, #333);
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.hero-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--primary-color, #1e3a5f);
    box-shadow: 0 3px 6px rgba(30, 58, 95, 0.15);
}

.hero-template::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color, #1e3a5f) 40%, var(--primary-color, #1e3a5f) 60%, transparent 100%);
    opacity: 0.7;
}

.hero-container {
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 var(--spacing-unit, 20px);
}

.hero-title-template {
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 250;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--primary-color, #1e3a5f);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

.hero-title-template::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--primary-color, #1e3a5f);
    opacity: 0.5;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}

.hero-subtitle-template {
    font-size: clamp(1.2rem, 2.8vw, 1.6rem);
    margin-bottom: 2.5rem;
    color: var(--text-secondary, #5a6b8c);
    font-weight: 350;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.hero-buttons-template {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ボタン（テンプレート対応） */
.btn-template {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--button-radius, 8px);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px var(--shadow-light, rgba(0,0,0,0.08));
}

.btn-primary-template {
    background: var(--primary-color, #1e3a5f);
    color: white;
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.25);
    border: 2px solid transparent;
    padding: 18px 44px;
    font-size: 1.1rem;
    letter-spacing: 0.8px;
    font-weight: 450;
    text-transform: uppercase;
}

.btn-primary-template:hover {
    background: var(--primary-dark, #2a4a73);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(30, 58, 95, 0.25);
}

.btn-secondary-template {
    background: transparent;
    color: var(--primary-color, #1e3a5f);
    border: 2px solid var(--primary-color, #1e3a5f);
    box-shadow: 0 3px 12px rgba(30, 58, 95, 0.1);
    padding: 18px 44px;
    font-size: 1.1rem;
    letter-spacing: 0.8px;
    font-weight: 450;
    text-transform: uppercase;
}

.btn-secondary-template:hover {
    background: var(--primary-color, #1e3a5f);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.18);
}

/* セクションテーマ（テンプレート対応） */
.section-title-template {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 280;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color, #1e3a5f);
    position: relative;
    letter-spacing: -0.015em;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

.section-title-template::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color, #1e3a5f);
    border-radius: 2px;
    opacity: 0.6;
    box-shadow: 0 2px 6px rgba(30, 58, 95, 0.2);
}

/* 当サービスのメリット（テンプレート対応） */
.benefits-template {
    padding: var(--section-padding, 80px 0);
    background: var(--bg-secondary, #f8fafc);
}

.benefits-grid-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card-template {
    background: var(--bg-primary, white);
    padding: 2.5rem 2rem;
    border-radius: var(--card-radius, 12px);
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-light, rgba(0,0,0,0.08));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #e2e8f0);
    position: relative;
}

.benefit-card-template:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(26, 35, 50, 0.15);
    border-color: var(--primary-color, #1a2332);
    background: var(--bg-primary, white);
}

.benefit-icon-template {
    font-size: 3.2rem;
    color: var(--primary-color, #1e3a5f);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.15);
}

.benefit-card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary, #1a2332);
    font-weight: 500;
}

.benefit-card-text {
    color: var(--text-secondary, #4a5568);
    line-height: 1.6;
}

/* 企業の悩み（テンプレート対応） */
.problems-template {
    padding: var(--section-padding, 80px 0);
    background: var(--bg-secondary, #f8fafc);
}

.problems-grid-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.problem-card-template {
    background: var(--bg-primary, white);
    padding: 2rem;
    border-radius: var(--card-radius, 12px);
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-light, rgba(0,0,0,0.08));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #e2e8f0);
}

.problem-card-template:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 56px rgba(30, 58, 95, 0.25);
    border-color: var(--primary-color, #1e3a5f);
    background: var(--bg-primary, white);
}

.problem-icon-template {
    font-size: 3rem;
    color: var(--primary-color, #2563eb);
    margin-bottom: 1rem;
}

.problem-card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary, #333);
}

.problem-card-text {
    color: var(--text-secondary, #666);
}

/* DXサポートproが選ばれる理由（テンプレート対応） */
.reasons-template {
    padding: var(--section-padding, 80px 0);
    background: var(--bg-primary, #ffffff);
}

.reasons-grid-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.reason-card-template {
    background: var(--bg-secondary, #f8fafc);
    padding: 2.5rem 2rem;
    border-radius: var(--card-radius, 12px);
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-light, rgba(0,0,0,0.08));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #e2e8f0);
    position: relative;
}

.reason-card-template:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 56px rgba(30, 58, 95, 0.25);
    border-color: var(--primary-color, #1e3a5f);
    background: var(--bg-secondary, #f8fafc);
}

.reason-number-template {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color, #2563eb);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.reason-card-title {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary, #333);
    font-weight: 600;
}

.reason-card-text {
    color: var(--text-secondary, #666);
    line-height: 1.7;
}

/* 解決提案（テンプレート対応） */
.solutions-template {
    padding: var(--section-padding, 80px 0);
    background: var(--bg-primary, white);
}

.solutions-content-template {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.solution-title-template {
    font-size: clamp(1.8rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
    color: var(--text-primary, #333);
}

.solution-description-template {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary, #666);
}

.solution-points-template {
    list-style: none;
}

.solution-point-template {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.solution-point-icon {
    color: var(--accent-color, #10b981);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.solution-point-text {
    color: var(--text-primary, #333);
}

.solution-image-template {
    text-align: center;
}

.solution-image-placeholder-template {
    background: var(--bg-tertiary, #e2e8f0);
    padding: 4rem 2rem;
    border-radius: var(--card-radius, 12px);
    color: var(--text-secondary, #666);
    transition: all 0.3s ease;
}

.solution-image-placeholder-template:hover {
    background: var(--bg-secondary, #f8fafc);
    transform: scale(1.02);
}

.solution-image-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color, #2563eb);
}

.solution-image-text {
    font-size: 1.1rem;
    margin: 0;
}

/* サービス一覧（テンプレート対応） */
.services-template {
    padding: var(--section-padding, 80px 0);
    background: var(--bg-secondary, #f8fafc);
}

.services-categories-template {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-btn-template {
    padding: 12px 24px;
    border: 2px solid var(--primary-color, #1e3a5f);
    background: var(--bg-primary, white);
    color: var(--primary-color, #1e3a5f);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.category-btn-template:hover,
.category-btn-active {
    background: var(--primary-color, #1e3a5f);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.3);
}

.services-grid-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card-template {
    background: var(--bg-primary, white);
    padding: 2rem;
    border-radius: var(--card-radius, 12px);
    box-shadow: 0 4px 20px var(--shadow-light, rgba(0,0,0,0.08));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #e2e8f0);
    opacity: 0;
    transform: translateY(30px);
}

.service-card-template:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 56px rgba(30, 58, 95, 0.25);
    border-color: var(--primary-color, #1e3a5f);
    background: var(--bg-primary, white);
}

.service-header-template {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.service-icon-template {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary-color, #2563eb);
}

.service-title-template {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.service-description-template {
    color: var(--text-secondary, #666);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-features-template {
    list-style: none;
}

.service-feature-template {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #555);
}

.service-feature-icon {
    color: var(--accent-color, #10b981);
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.service-feature-text {
    color: var(--text-secondary, #555);
}

/* 導入までの流れ（テンプレート対応） */
.flow-template {
    padding: var(--section-padding, 80px 0);
    background: var(--bg-primary, white);
}

.flow-steps-template {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.flow-step-template {
    text-align: center;
    flex: 1;
    min-width: 200px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.step-number-template {
    width: 60px;
    height: 60px;
    background: var(--primary-color, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px var(--shadow-medium, rgba(0,0,0,0.1));
}

.flow-step-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary, #333);
}

.flow-step-text {
    color: var(--text-secondary, #666);
}

.flow-arrow-template {
    font-size: 2rem;
    color: var(--primary-color, #2563eb);
    margin: 0 1rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

/* お問い合わせ（テンプレート対応） */
.contact-template {
    padding: var(--section-padding, 80px 0);
    background: var(--bg-secondary, #f8fafc);
}

.contact-content-template {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-title-template {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    margin-bottom: 1rem;
    color: var(--text-primary, #333);
}

.contact-description-template {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary, #666);
}

.contact-methods-template {
    margin-top: 2rem;
}

.contact-method-template {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary, white);
    border-radius: var(--card-radius, 12px);
    box-shadow: 0 2px 12px var(--shadow-light, rgba(0,0,0,0.05));
    transition: all 0.3s ease;
}

.contact-method-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow-medium, rgba(0,0,0,0.08));
}

.contact-method-icon {
    font-size: 1.5rem;
    color: var(--primary-color, #2563eb);
    margin-right: 1rem;
    margin-top: 0.2rem;
}

.contact-method-content {
    flex: 1;
}

.contact-method-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #333);
}

.contact-method-phone,
.contact-method-email {
    font-size: 1.1rem;
    color: var(--primary-color, #2563eb);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-method-hours {
    color: var(--text-secondary, #666);
}

.contact-form-template {
    background: var(--bg-primary, white);
    padding: 2rem;
    border-radius: var(--card-radius, 12px);
    box-shadow: 0 4px 20px var(--shadow-light, rgba(0,0,0,0.08));
}

.form-group-template {
    margin-bottom: 1.5rem;
}

.form-label-template {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary, #333);
}

.required-template {
    color: #ef4444;
}

.form-input-template,
.form-select-template,
.form-textarea-template {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: var(--input-radius, 8px);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary, white);
    color: var(--text-primary, #333);
    box-shadow: inset 0 1px 2px var(--shadow-light, rgba(0,0,0,0.05));
}

.form-input-template:focus,
.form-select-template:focus,
.form-textarea-template:focus {
    outline: none;
    border-color: var(--primary-color, #1e3a5f);
    box-shadow: 0 0 0 5px rgba(30, 58, 95, 0.2);
    transform: translateY(-1px);
}

.form-textarea-template {
    resize: vertical;
    min-height: 120px;
}

.btn-submit-template {
    width: 100%;
    padding: 14px 30px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* フッター（テンプレート対応） */
.footer-template {
    background: var(--bg-tertiary, #1e293b);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title-template {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color, #2563eb);
}

.footer-description-template {
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.6;
}

.footer-subtitle-template {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-links-template {
    list-style: none;
}

.footer-link-item-template {
    margin-bottom: 0.5rem;
}

.footer-link-template {
    color: var(--text-secondary, #cbd5e1);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.footer-link-template:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom-template {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
}

.footer-copyright-template {
    margin: 0;
}

/* テーマ切替ボタン */
.theme-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1001;
    background: var(--bg-primary, white);
    padding: 1rem;
    border-radius: var(--card-radius, 12px);
    box-shadow: 0 4px 20px var(--shadow-medium, rgba(0,0,0,0.1));
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color, #e2e8f0);
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #333);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow-light, rgba(0,0,0,0.05));
    transition: all 0.3s ease;
    font-size: 1rem;
}

.theme-btn:hover,
.theme-btn.active {
    background: var(--primary-color, #2563eb);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-medium, rgba(0,0,0,0.1));
}

.theme-btn.active {
    background: var(--primary-dark, #1d4ed8);
    transform: scale(1.05);
}

/* レイアウト切替ボタン */
.layout-switcher {
    position: fixed;
    top: 320px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1001;
    background: var(--bg-primary, white);
    padding: 1rem;
    border-radius: var(--card-radius, 12px);
    box-shadow: 0 4px 20px var(--shadow-medium, rgba(0,0,0,0.1));
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color, #e2e8f0);
}

.layout-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #333);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow-light, rgba(0,0,0,0.05));
    transition: all 0.3s ease;
    font-size: 1rem;
}

.layout-btn:hover,
.layout-btn.active {
    background: var(--secondary-color, #64748b);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-medium, rgba(0,0,0,0.1));
}

.layout-btn.active {
    background: var(--primary-color, #2563eb);
    transform: scale(1.05);
}

/* 切替ボタンのラベル */
.switcher-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* レスポンシブな切替ボタン */
@media (max-width: 768px) {
    .theme-switcher,
    .layout-switcher {
        position: relative;
        top: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin: 2rem 0;
        backdrop-filter: none;
    }
    
    .theme-switcher {
        order: -1;
    }
    
    .layout-switcher {
        order: -2;
    }
}

/* アニメーションクラス */
.hero-visible {
    animation: heroFadeIn 1s ease-out;
}

.card-visible {
    animation: cardSlideUp 0.8s ease-out;
}

.service-card-visible {
    animation: serviceCardAppear 0.6s ease-out;
}

.hero-content-visible {
    animation: heroContentScale 1s ease-out;
}

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

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes serviceCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroContentScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* エラーメッセージ（テンプレート対応） */
.error-message-template {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    border-left: 3px solid #ef4444;
}

.form-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* 成功メッセージ（テンプレート対応） */
.success-message-template {
    margin-bottom: 1rem;
    animation: slideInFromTop 0.5s ease-out;
}

.success-message-content-template {
    background: var(--accent-color, #3a7d5d);
    color: white;
    padding: 1rem;
    border-radius: var(--card-radius, 8px);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.success-message-icon {
    font-size: 1.2rem;
}

.success-message-text {
    font-weight: 500;
}

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

/* ヘッダースクロール効果 */
.header-scrolled {
    box-shadow: 0 4px 20px var(--shadow-medium, rgba(0,0,0,0.1));
}

.header-hidden {
    transform: translateY(-100%);
}

/* レスポンシブ対応（テンプレート対応） */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav {
        display: none;
    }
    
    .hero-buttons-template {
        flex-direction: column;
        align-items: center;
    }
    
    .solutions-content-template,
    .contact-content-template {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .flow-steps-template {
        flex-direction: column;
    }
    
    .flow-arrow-template {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .services-categories-template {
        flex-direction: column;
        align-items: center;
    }
    
    .theme-switcher,
    .layout-switcher {
        position: relative;
        top: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin: 2rem 0;
        backdrop-filter: none;
    }
    
    .theme-switcher {
        order: -1;
    }
    
    .layout-switcher {
        order: -2;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-template {
        padding: 100px 0 60px;
    }
    
    .problems-grid-template,
    .services-grid-template {
        grid-template-columns: 1fr;
    }
    
    .section-title-template {
        font-size: clamp(1.8rem, 5vw, 2rem);
    }
    
    .btn-template {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}