/* CRO & Accessibility Styles */

/* ============================================
   CRO最適化スタイル
   ============================================ */

/* CTAボタンの改善 */
.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.cta-primary:hover,
.cta-primary:focus {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.5);
    outline: 3px solid rgba(0, 212, 255, 0.5);
    outline-offset: 2px;
}

.cta-primary:active {
    transform: translateY(-1px) scale(1.02);
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

/* サービスカードのCTA */
.service-cta {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid #00d4ff;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.service-cta:hover,
.service-cta:focus {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* フローティングCTA */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.floating-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.floating-cta-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    text-decoration: none;
    font-weight: 600;
    min-height: 44px;
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
}

.floating-cta-button:hover,
.floating-cta-button:focus {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 212, 255, 0.6);
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(0, 212, 255, 0.6);
    }
}

@media (max-width: 768px) {
    .floating-cta {
        bottom: 1rem;
        right: 1rem;
    }
    
    .floating-cta-button {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .floating-cta-button span:last-child {
        display: none;
    }
}

/* ============================================
   FAQセクション（AEO対策）
   ============================================ */

#faq {
    padding: 80px 20px;
    background: rgba(0, 0, 0, 0.3);
}

.faq-container {
    max-width: 900px;
    margin: 40px auto 0;
}

.faq-item {
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    min-height: 44px;
}

.faq-question:hover,
.faq-question:focus {
    background: rgba(0, 212, 255, 0.1);
    outline: 2px solid #00d4ff;
    outline-offset: -2px;
}

.faq-question[aria-expanded="true"] {
    background: rgba(0, 212, 255, 0.15);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: #00d4ff;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-answer[aria-hidden="false"] {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    margin: 0;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.faq-answer a {
    color: #00d4ff;
    text-decoration: underline;
}

.faq-answer a:hover,
.faq-answer a:focus {
    color: #33ddff;
    outline: 2px solid #33ddff;
    outline-offset: 2px;
}

/* ============================================
   アクセシビリティスタイル
   ============================================ */

/* フォーカス表示の強化 */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #00d4ff;
    outline-offset: 2px;
}

/* キーボード操作の視覚的フィードバック */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #00d4ff;
    outline-offset: 2px;
}

/* タッチデバイスでのホバー無効化 */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
    }
    
    a:hover {
        color: inherit;
    }
}

/* スクリーンリーダー専用テキスト */
.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;
}

/* モバイルメニューのアクセシビリティ */
.mobile-menu-toggle[aria-expanded="true"] + .mobile-menu {
    display: block;
}

.mobile-menu[aria-hidden="true"] {
    display: none;
}

.mobile-menu[aria-hidden="false"] {
    display: block;
}

/* セクションのラベル付け */
section[aria-labelledby] {
    scroll-margin-top: 100px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary,
    .cta-primary {
        border: 2px solid currentColor;
    }
}

/* アニメーション無効化（アクセシビリティ） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-cta-button {
        animation: none;
    }
}

/* ============================================
   社会的証明セクション
   ============================================ */

#social-proof {
    padding: 80px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.social-proof-content {
    max-width: 1200px;
    margin: 40px auto 0;
}

/* 実績数値 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 60px;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* お客様の声 */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.testimonial-rating {
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.testimonial-text {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    color: #00d4ff;
    font-size: 1.1rem;
}

.testimonial-company {
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* スクロールトップボタン */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
    background: linear-gradient(45deg, #0099cc, #00d4ff);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
