/**
 * 共通ボタンスタイル
 * 統一されたボタンシステム（パターン別）
 */

/* ==========================================================================
   ボタンベースクラス
   ========================================================================== */

.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-base:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-base:active {
    transform: translateY(0);
}

/* ==========================================================================
   ボタンサイズバリエーション
   ========================================================================== */

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
    border-radius: var(--border-radius-md);
}

.btn-md {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    border-radius: var(--border-radius-lg);
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: var(--font-size-lg);
    border-radius: var(--border-radius-xl);
}

.btn-hero {
    padding: var(--spacing-lg) var(--spacing-3xl) var(--spacing-lg) var(--spacing-2xl);
    font-size: var(--font-size-lg);
    border-radius: var(--border-radius-full);
}

/* ==========================================================================
   ボタンスタイルパターン
   ========================================================================== */

/* 1. プライマリ（アクセント色）- 最重要CTA */
.btn-primary-cta {
    background: linear-gradient(135deg, var(--btn-primary-bg), var(--btn-primary-bg-hover));
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--btn-primary-bg-hover), var(--color-accent-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.btn-primary-cta:hover {
    color: var(--color-white);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary-cta:hover::before {
    opacity: 1;
}

/* 2. セカンダリ（プライマリ色）- 通常アクション */
.btn-secondary-action {
    background: linear-gradient(135deg, var(--btn-secondary-bg), var(--btn-secondary-bg-hover));
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(0, 115, 170, 0.3);
}

.btn-secondary-action:hover {
    color: var(--color-white);
    box-shadow: 0 6px 25px rgba(0, 115, 170, 0.4);
}

/* 3. アウトライン - 軽いアクション */
.btn-outline-light {
    background: transparent;
    color: var(--btn-outline-border);
    border: 2px solid var(--btn-outline-border);
    box-shadow: none;
}

.btn-outline-light:hover {
    background: rgba(0, 115, 170, 0.1);
    border-color: var(--color-primary-dark);
    color: var(--color-primary-dark);
    box-shadow: 0 4px 20px rgba(0, 115, 170, 0.2);
}

/* ==========================================================================
   矢印付きボタン（従来システム互換）
   ========================================================================== */

/* 矢印付きボタンの共通構造 */
.btn-with-arrow {
    gap: var(--spacing-md);
}

.btn-with-arrow .button-text {
    position: relative;
    z-index: 1;
}

.btn-with-arrow .button-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-with-arrow:hover .button-arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

/* プライマリボタン（矢印付き） */
.btn-primary-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: var(--color-white);
    text-decoration: none;
    padding: var(--spacing-lg) var(--spacing-2xl);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

/* ボタンホバーエフェクト背景 */
.btn-primary-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.btn-primary-arrow:hover {
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.btn-primary-arrow:hover::before {
    opacity: 1;
}

/* ボタンテキスト */
.btn-primary-arrow .button-text {
    font-size: var(--font-size-lg);
    position: relative;
    z-index: 1;
}

/* 矢印アイコンコンテナ */
.btn-primary-arrow .button-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-primary-arrow:hover .button-arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .btn-primary-arrow {
        padding: 1.6rem 3rem;
        font-size: var(--font-size-base);
        gap: 1.2rem;
    }
    
    .btn-primary-arrow .button-text {
        font-size: var(--font-size-base);
    }
    
    .btn-primary-arrow .button-arrow {
        width: 36px;
        height: 36px;
    }
}