/* 共通ユーティリティクラス */

/* マージン */
.m-0 { margin: 0; }
.m-1 { margin: 1rem; }
.m-2 { margin: 2rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.ml-1 { margin-left: 1rem; }
.mr-1 { margin-right: 1rem; }

/* パディング */
.p-0 { padding: 0; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }
.pl-1 { padding-left: 1rem; }
.pr-1 { padding-right: 1rem; }

/* テキスト配置 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* テキストカラー（緑系） */
.text-primary { color: var(--primary-green); }
.text-secondary { color: var(--secondary-green); }
.text-dark-green { color: var(--dark-green); }
.text-light { color: var(--text-light); }
.text-dark { color: var(--text-dark); }
.text-white { color: white; }
.text-green { color: var(--primary-green); }
.text-red { color: #e74c3c; }
.text-warning { color: #f39c12; }

/* 背景色 */
.bg-primary { background-color: var(--primary-green); }
.bg-secondary { background-color: var(--secondary-green); }
.bg-light-green { background-color: var(--light-green); }
.bg-white { background-color: white; }
.bg-light { background-color: #f8f9fa; }

/* フレックスボックス */
.flex { display: flex; }
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex-column {
    display: flex;
    flex-direction: column;
}
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

/* 表示制御 */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.hidden { visibility: hidden; }
.visible { visibility: visible; }

/* ボーダー */
.border { border: 1px solid var(--border-color); }
.border-primary { border: 2px solid var(--primary-green); }
.border-secondary { border: 2px solid var(--secondary-green); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-left { border-left: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }
.border-radius { border-radius: 8px; }
.rounded { border-radius: 5px; }
.rounded-circle { border-radius: 50%; }

/* 幅・高さ */
.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.w-25 { width: 25%; }
.w-auto { width: auto; }
.h-100 { height: 100%; }
.h-auto { height: auto; }
.full-width { width: 100%; }
.max-width { max-width: 1200px; }

/* フォント */
.font-bold { font-weight: bold; }
.font-normal { font-weight: normal; }
.font-light { font-weight: 300; }
.font-small { font-size: 0.875rem; }
.font-large { font-size: 1.25rem; }
.font-xlarge { font-size: 1.5rem; }

/* リスト */
.list-none { list-style: none; }
.list-disc { list-style-type: disc; }
.list-decimal { list-style-type: decimal; }

/* 影 */
.shadow-sm { box-shadow: 0 1px 3px rgba(45, 122, 45, 0.1); }
.shadow { box-shadow: 0 2px 10px rgba(45, 122, 45, 0.1); }
.shadow-lg { box-shadow: 0 4px 20px rgba(45, 122, 45, 0.15); }

/* ボタン共通スタイル */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--primary-green) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 122, 45, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
    background: var(--light-green);
    border-color: var(--secondary-green);
}

.btn-success {
    background: var(--secondary-green);
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

/* リンクスタイル */
a {
    color: var(--primary-green);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-green);
}

/* セクション */
.section {
    padding: 3rem 0;
}

.section-item {
    margin-bottom: 3rem;
}

.section-title {
    color: var(--primary-green);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--light-green);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    width: 100%;
    padding: 0 2rem;
}

/* Google Tag Manager Noscript 非表示 */
.gtm-noscript {
    display: none;
    visibility: hidden;
}

/* ハイライト */
.highlight {
    background: linear-gradient(transparent 60%, var(--light-green) 60%);
    padding: 0 0.2rem;
}

/* バッジ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: bold;
    border-radius: 3px;
    background: var(--primary-green);
    color: white;
}

.badge-secondary {
    background: var(--secondary-green);
}

.badge-success {
    background: #27ae60;
}

.badge-warning {
    background: #f39c12;
}

.badge-danger {
    background: #e74c3c;
}

/* オーバーレイ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* スピナー（ローディング） */
.spinner {
    border: 3px solid var(--light-green);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* レスポンシブユーティリティ */
@media (max-width: 768px) {
    .hide-mobile { display: none; }
    .show-mobile { display: block; }
    
    /* モバイル用のマージン・パディング調整 */
    .m-1 { margin: 0.5rem !important; }
    .m-2 { margin: 1rem !important; }
    .mt-1 { margin-top: 0.5rem !important; }
    .mt-2 { margin-top: 1rem !important; }
    .mb-1 { margin-bottom: 0.5rem !important; }
    .mb-2 { margin-bottom: 1rem !important; }
    .ml-1 { margin-left: 0.5rem !important; }
    .mr-1 { margin-right: 0.5rem !important; }
    
    .p-1 { padding: 0.5rem !important; }
    .p-2 { padding: 1rem !important; }
    .pt-1 { padding-top: 0.5rem !important; }
    .pt-2 { padding-top: 1rem !important; }
    .pb-1 { padding-bottom: 0.5rem !important; }
    .pb-2 { padding-bottom: 1rem !important; }
    .pl-1 { padding-left: 0.5rem !important; }
    .pr-1 { padding-right: 0.5rem !important; }
    
    /* セクション調整 */
    .section {
        padding: 1rem 0 !important;
    }
    
    .section-item {
        margin-bottom: 1rem !important;
    }
    
    .section-title {
        font-size: 1.4rem !important;
        margin-bottom: 0.8rem !important;
        padding-bottom: 0.3rem !important;
    }
    
    /* コンテナ調整 */
    .container {
        padding: 0 3% !important;
    }
    
    .container-fluid {
        padding: 0 3% !important;
    }
    
    /* ギャップ調整 */
    .gap-1 { gap: 0.5rem !important; }
    .gap-2 { gap: 1rem !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none; }
    .show-desktop { display: block; }
}

/* アクセシビリティ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* スクロールバー（Chrome, Safari） */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-green);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}