/* カスタムCSSスタイル */

/* アニメーション定義 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* アニメーションクラス */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

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

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

/* 遅延アニメーション */
.animate-delay-200 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.animate-delay-400 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.animate-delay-600 {
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

/* ヒーローセクションの背景グラデーション */
.hero-bg {
    background: linear-gradient(135deg, #0f9d58 0%, #34a853 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* カードホバーエフェクト */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* サービスアイコンのグラデーション */
.service-icon {
    background: linear-gradient(135deg, #0f9d58 0%, #34a853 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: iconGradient 3s ease-in-out infinite;
}

@keyframes iconGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* フォーカススタイルの改善 */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2;
    ring-color: #34a853;
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.12);
}

/* ボタンホバーエフェクト */
.btn-primary {
    background: linear-gradient(135deg, #0f9d58 0%, #34a853 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 157, 88, 0.35);
}

/* セクション区切り線 */
.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #0f9d58 0%, #34a853 100%);
    border-radius: 2px;
    margin: 0 auto;
}

/* モバイル対応の改善 */
@media (max-width: 768px) {
    .hero-bg h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-bg p {
        font-size: 1.125rem;
    }
    
    .card-hover {
        margin-bottom: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0f9d58 0%, #34a853 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0c7c43 0%, #2e7d32 100%);
}

/* ローディングアニメーション（将来の拡張用） */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #34a853;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 成功メッセージのアニメーション */
.success-message {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* フェードアウトアニメーション */
.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ホバー時のテキスト効果 */
.text-hover-gradient:hover {
    background: linear-gradient(135deg, #0f9d58 0%, #34a853 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

/* パフォーマンス最適化 */
.gpu-acceleration {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* アクセシビリティの改善 */
.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;
}

/* フォーカス可能要素のアウトライン */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #34a853;
    outline-offset: 2px;
}

/* プリントスタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .page-break {
        page-break-before: always;
    }
}
