/* 
 * 英数Labo LP Custom Styles
 * Modern, clean design with smooth animations
 */

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* 基本スタイル */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* CTAボタンスタイル */
.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
    min-width: 280px;
    text-align: center;
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: white;
    color: #f97316;
    font-weight: bold;
    font-size: 1.125rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
    min-width: 280px;
    text-align: center;
}

.cta-btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
    background: #fff7ed;
}

/* FAQアコーディオンアニメーション */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-top: 0;
    padding-bottom: 1.5rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-question i {
    transition: transform 0.3s ease;
}

/* テーブルのレスポンシブ対応 */
@media (max-width: 768px) {
    #pricing table {
        font-size: 0.875rem;
    }
    
    #pricing th,
    #pricing td {
        padding: 0.75rem 0.5rem;
    }
    
    .cta-btn-primary,
    .cta-btn-secondary {
        min-width: 100%;
        font-size: 1rem;
    }
}

/* ヘッダーのスクロール時スタイル */
header {
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* アニメーション用クラス */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* セクション間のスムーズな遷移 */
section {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ホバーエフェクト強化 */
a:not(.cta-btn-primary):not(.cta-btn-secondary) {
    transition: all 0.2s ease;
}

/* カードホバーエフェクト */
.hover\:shadow-xl {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover\:shadow-xl:hover {
    transform: translateY(-5px);
}

/* グラデーション背景のアニメーション */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#fv {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* スクロールインジケーター（オプション） */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #facc15);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* 印刷用スタイル */
@media print {
    header,
    footer,
    .cta-btn-primary,
    .cta-btn-secondary {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* アクセシビリティ：フォーカス時のアウトライン */
a:focus,
button:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* ローディングアニメーション */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* タブレット向け調整 */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* スムーズなページ内リンク */
[id] {
    scroll-margin-top: 80px;
}

/* 数字カウンターアニメーション用 */
.counter {
    transition: transform 0.3s ease;
}

.counter:hover {
    transform: scale(1.1);
}

/* 背景パターン（オプション） */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* グロー効果 */
.glow {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.glow:hover {
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.7);
}

/* レスポンシブテキストサイズ */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* テーブルのスクロールヒント */
.overflow-x-auto::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(249, 250, 251, 1), transparent);
    pointer-events: none;
}

@media (min-width: 768px) {
    .overflow-x-auto::after {
        display: none;
    }
}

/* セクション区切り線 */
.section-divider {
    position: relative;
    padding-top: 3rem;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #facc15);
    border-radius: 2px;
}

/* 画像の遅延読み込み対応 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    /* 必要に応じてダークモードスタイルを追加 */
}

/* iOS Safari対応 */
@supports (-webkit-touch-callout: none) {
    .cta-btn-primary,
    .cta-btn-secondary {
        -webkit-appearance: none;
    }
}

/* スムーズなトランジション */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ボタンのアクティブ状態 */
.cta-btn-primary:active,
.cta-btn-secondary:active {
    transform: translateY(-1px);
}

/* セクションのフェードイン */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

/* 浮遊アニメーション */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* LINE風のグリーンアクセント */
.line-green {
    color: #06c755;
}

.bg-line-green {
    background-color: #06c755;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}