/* =================================
   THE BANANA 体質改善プログラム LP
   カスタムスタイル
   ================================= */

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

/* ベーススタイル */
body {
    overflow-x: hidden;
}

/* ロゴスタイル */
header img {
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
    display: block;
}

header img:hover {
    transform: scale(1.05);
}

/* フッターのロゴを白く表示 */
footer img.brightness-0.invert {
    filter: brightness(0) invert(1);
}

footer img {
    max-width: 100%;
    height: auto;
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
    header img {
        height: 3rem !important; /* h-12相当 */
    }
    
    footer img {
        height: 8rem !important; /* h-32相当 */
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    header img {
        height: 3.5rem !important; /* h-14相当 */
    }
}

@media (min-width: 769px) {
    header img {
        height: 4rem !important; /* h-16相当 */
    }
    
    footer img {
        height: 12rem !important; /* h-48相当 */
    }
}

/* アニメーション用クラス */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.fade-in-delay-1 {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.2s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.4s forwards;
}

.fade-in-delay-3 {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

.fade-in-delay-4 {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* フェードインアニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ヘッダースクロール時のスタイル */
#header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* FAQアコーディオン */
.faq-question i {
    transition: transform 0.3s ease;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer.open {
    display: block;
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

/* スクロールトップボタン */
#scrollToTop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#scrollToTop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* カスタムテーブルレスポンシブ */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    table th,
    table td {
        min-width: 150px;
    }
}

/* グラデーション背景のパターン */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(151, 188, 98, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(44, 95, 45, 0.05) 0%, transparent 50%);
}

/* ホバーエフェクト強化 */
a, button {
    transition: all 0.3s ease;
}

/* カード要素のシャドウ */
.shadow-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.shadow-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

/* セクションの区切り線装飾 */
.section-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(to right, transparent, #2C5F2D, transparent);
    margin: 3rem auto;
    max-width: 300px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #2C5F2D;
    border-radius: 50%;
}

.section-divider::before {
    left: 0;
}

.section-divider::after {
    right: 0;
}

/* プランカードのホバーエフェクト */
.plan-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* タイポグラフィ強調 */
.text-emphasis {
    position: relative;
    display: inline-block;
}

.text-emphasis::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 184, 77, 0.3);
    z-index: -1;
}

/* リストスタイル */
.custom-list {
    list-style: none;
    padding-left: 0;
}

.custom-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.custom-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #97BC62;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 引用スタイル */
blockquote {
    border-left: 4px solid #97BC62;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4a5568;
}

/* レスポンシブ調整 */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* アクセシビリティ: フォーカス状態 */
a:focus,
button:focus {
    outline: 2px solid #97BC62;
    outline-offset: 2px;
}

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

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

/* スムーズなページ遷移 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* プリント時のスタイル */
@media print {
    header,
    footer,
    #scrollToTop,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* ダークモード対応（オプション）*/
@media (prefers-color-scheme: dark) {
    /* ダークモードが必要な場合はここに追加 */
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2C5F2D;
}

/* Firefoxのスクロールバー */
* {
    scrollbar-width: thin;
    scrollbar-color: #97BC62 #f1f1f1;
}

/* セレクションカラー */
::selection {
    background-color: #97BC62;
    color: white;
}

::-moz-selection {
    background-color: #97BC62;
    color: white;
}

/* テキストのアンダーラインアニメーション */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2C5F2D;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* グリッドレイアウトの改善 */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* フォームスタイル（必要に応じて） */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: #2C5F2D;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

/* ボタンスタイルのバリエーション */
.btn-primary {
    background-color: #2C5F2D;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1e4620;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(44, 95, 45, 0.2);
}

.btn-secondary {
    background-color: #97BC62;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #7da04f;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(151, 188, 98, 0.2);
}

/* バッジスタイル */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #FFB84D;
    color: #1A1A1A;
}

/* カードのグロー効果 */
.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #2C5F2D, #97BC62, #FFB84D);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card-glow:hover::before {
    opacity: 0.3;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}