/* Custom CSS Styles for maido&crafts strategy */

/* カスタムアニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* スクロールアニメーション用クラス */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

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

/* カスタムスクロールバー */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: #2db4a6;
    border-radius: 6px;
}

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

/* ローディングアニメーション */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f59e0b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ボタンホバーエフェクト */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-hover-effect:hover::before {
    width: 300px;
    height: 300px;
}

/* カード3Dエフェクト */
.card-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* テキストグローエフェクト */
.text-glow {
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

/* セクション区切り線 */
.section-divider {
    position: relative;
    text-align: center;
    margin: 60px 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

/* パララックス背景 */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* レスポンシブ基本設定 */
/* スマートフォン */
@media (max-width: 640px) {
    /* ナビゲーション */
    nav {
        height: 64px;
    }
    
    /* ヒーローセクション */
    .hero-gradient {
        background: #f8f9fa;
        padding-top: 64px;
    }
    
    /* フォントサイズ */
    h1 {
        font-size: 1.875rem !important; /* 30px */
        line-height: 1.25 !important;
    }
    
    h2 {
        font-size: 1.5rem !important; /* 24px */
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.25rem !important; /* 20px */
        line-height: 1.4 !important;
    }
    
    p {
        font-size: 1rem !important; /* 16px */
        line-height: 1.6 !important;
    }
    
    /* セクション余白 */
    section {
        padding: 3rem 0 !important;
    }
    
    .container {
        padding: 0 1rem !important;
    }
}

/* タブレット */
@media (min-width: 641px) and (max-width: 1023px) {
    /* ナビゲーション */
    nav {
        height: 64px;
    }
    
    /* ヒーローセクション */
    .hero-gradient {
        padding-top: 64px;
    }
    
    /* フォントサイズ */
    h1 {
        font-size: 2.25rem !important; /* 36px */
        line-height: 1.25 !important;
    }
    
    h2 {
        font-size: 1.875rem !important; /* 30px */
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.5rem !important; /* 24px */
        line-height: 1.4 !important;
    }
    
    /* セクション余白 */
    section {
        padding: 4rem 0 !important;
    }
    
    .container {
        padding: 0 2rem !important;
    }
}

/* デスクトップ */
@media (min-width: 1024px) {
    /* ナビゲーション */
    nav {
        height: 80px;
    }
    
    /* ヒーローセクション */
    .hero-gradient {
        padding-top: 80px;
    }
    
    /* セクション余白 */
    section {
        padding: 5rem 0 !important;
    }
    
    .container {
        max-width: 1280px;
        padding: 0 2rem !important;
    }
}

/* 共通のモバイル対応 */
@media (max-width: 1023px) {
    /* カード調整 */
    .card-hover, .skill-card, .benefit-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem;
    }
    
    /* テーブルのレスポンシブ対応 */
    .info-table {
        display: block;
    }
    
    .info-table tbody,
    .info-table tr,
    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }
    
    .info-table th {
        text-align: left;
        padding: 0.75rem;
        border-radius: 0.5rem 0.5rem 0 0;
    }
    
    .info-table td {
        padding: 1rem;
        border-radius: 0 0 0.5rem 0.5rem;
        margin-bottom: 1rem;
    }
    
    /* グリッドレイアウト調整 */
    .grid {
        gap: 1rem !important;
    }
    
    /* 画像サイズ調整 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 横スクロール防止 */
    body {
        overflow-x: hidden;
    }
}

/* スマートフォン（小画面）最適化 */
@media (max-width: 480px) {
    /* 超小型デバイス向け調整 */
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    .btn, button, a.inline-block {
        font-size: 0.875rem !important;
        padding: 10px 16px !important;
        width: 100%;
        text-align: center;
    }
    
    /* カード内の余白をさらに削減 */
    .card-hover, .skill-card, .benefit-card {
        padding: 1rem !important;
    }
    
    /* グリッドを1列に */
    .grid {
        grid-template-columns: 1fr !important;
    }
    
    /* フォントアイコンのサイズ調整 */
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
    }
    
    .text-5xl {
        font-size: 2rem !important;
    }
}

/* タブレット最適化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* グリッドを2列に */
    .grid.md\:grid-cols-3,
    .grid.md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* プリント用スタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
    }
    
    .hero-gradient {
        background: none;
        color: black;
    }
}

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

/* フォーカススタイル */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* 選択テキストのスタイル */
::selection {
    background-color: rgba(245, 158, 11, 0.3);
    color: #333;
}

::-moz-selection {
    background-color: rgba(245, 158, 11, 0.3);
    color: #333;
}

/* フォームスタイル */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* エラーメッセージ */
.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 4px;
}

/* 成功メッセージ */
.success-message {
    color: #10b981;
    font-size: 14px;
    margin-top: 4px;
}

/* ツールチップ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* バッジスタイル */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-primary {
    background-color: #f59e0b;
    color: white;
}

.badge-success {
    background-color: #10b981;
    color: white;
}

.badge-warning {
    background-color: #f59e0b;
    color: white;
}

.badge-danger {
    background-color: #ef4444;
    color: white;
}

/* プログレスバー */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #2db4a6;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* モーダル背景 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.modal-backdrop.active {
    display: block;
}

/* ドロップダウンメニュー */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1;
    top: 100%;
    margin-top: 8px;
}

.dropdown-content.show {
    display: block;
}

/* アコーディオン */
.accordion-item {
    border-bottom: 1px solid #e5e7eb;
}

.accordion-header {
    padding: 16px;
    cursor: pointer;
    background-color: white;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #f9fafb;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
    padding: 16px;
}

/* タブナビゲーション */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}

.tab-nav-item {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.tab-nav-item:hover {
    color: #f59e0b;
}

.tab-nav-item.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ステップインジケーター */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #e5e7eb;
    z-index: -1;
}

.step:last-child::after {
    display: none;
}

.step.active::after {
    background-color: #f59e0b;
}

.step-number {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    background-color: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.step.active .step-number {
    background: #f59e0b;
}

/* ページネーション */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

.pagination-item {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-item:hover {
    background-color: #f9fafb;
}

.pagination-item.active {
    background: #2db4a6;
    color: white;
    border-color: transparent;
}

/* カスタムチェックボックス */
.custom-checkbox {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #e5e7eb;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    background: #2db4a6;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}