/* Recruit Page - Advanced Animations & Interactive Effects */
/* Version 1.0.1 - 2026-10-19 - Floating CTA Position Fix */

/* ========================================
   1. KEYFRAME ANIMATIONS
   ======================================== */

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

/* パルスグロー - CTA強調 */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(255, 215, 0, 0);
    }
}

/* スライドインフロム左 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* スライドインフロム右 */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* スライドインフロム下 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* フェードインスケール */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* アイコンバウンス */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-8px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-4px);
    }
}

/* グラデーション移動 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* スケール回転 */
@keyframes scaleRotate {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* シェイク（注目喚起） */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ========================================
   2. PAGE HEADER ENHANCEMENTS
   ======================================== */

.page-header {
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 215, 0, 0.1),
        transparent
    );
    animation: gradientShift 10s ease infinite;
}

.page-header h1 {
    animation: slideInUp 0.8s ease-out;
}

.page-header p {
    animation: slideInUp 0.8s ease-out 0.2s backwards;
}

/* ========================================
   3. CLINIC CARDS - 3D TRANSFORM
   ======================================== */

.clinic-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.clinic-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(10, 61, 61, 0.3);
}

.clinic-card-header {
    transition: all 0.3s ease;
}

.clinic-card:hover .clinic-card-header {
    transform: scale(1.05);
}

.clinic-card-header i {
    animation: float 3s ease-in-out infinite;
}

.clinic-card:hover .clinic-card-header i {
    animation: iconBounce 0.6s ease;
}

.clinic-card .cta-button {
    position: relative;
    overflow: hidden;
}

.clinic-card .cta-button::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;
}

.clinic-card .cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   4. BENEFITS SECTION - STAGGER ANIMATION
   ======================================== */

.benefits-grid > div {
    opacity: 0;
    animation: slideInUp 0.6s ease-out forwards;
}

.benefits-grid > div:nth-child(1) { animation-delay: 0.1s; }
.benefits-grid > div:nth-child(2) { animation-delay: 0.2s; }
.benefits-grid > div:nth-child(3) { animation-delay: 0.3s; }
.benefits-grid > div:nth-child(4) { animation-delay: 0.4s; }
.benefits-grid > div:nth-child(5) { animation-delay: 0.5s; }
.benefits-grid > div:nth-child(6) { animation-delay: 0.6s; }

.benefits-grid h4 i {
    display: inline-block;
    transition: all 0.3s ease;
}

.benefits-grid > div:hover h4 i {
    transform: scale(1.3) rotate(360deg);
}

/* ========================================
   5. FAQ SECTION - INTERACTIVE
   ======================================== */

.faq-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.faq-item:hover {
    transform: translateX(10px);
    border-left-width: 8px;
    box-shadow: 0 8px 30px rgba(10, 61, 61, 0.15);
}

.faq-q-badge {
    transition: all 0.3s ease;
}

.faq-item:hover .faq-q-badge {
    transform: rotate(360deg) scale(1.2);
    background: linear-gradient(135deg, #0A3D3D, #FFD700);
}

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

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
}

/* ========================================
   6. APPLICATION SECTION - PREMIUM CARDS
   ======================================== */

.application-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.application-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(10, 61, 61, 0.2);
}

.app-icon {
    transition: all 0.4s ease;
}

.application-card:hover .app-icon {
    transform: rotateY(360deg);
}

/* ========================================
   7. CTA BUTTONS - ENHANCED
   ======================================== */

.cta-button {
    position: relative;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #0A3D3D, #164545);
    background-size: 200% 200%;
}

.cta-button:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(10, 61, 61, 0.3);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: scale(1.2) rotate(15deg);
}

/* メインCTAボタン（応募用） */
.cta-button-primary {
    animation: pulseGlow 2s infinite;
}

/* ========================================
   8. SCROLL REVEAL CLASSES
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   9. FLOATING CTA BUTTON
   ======================================== */

.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.4s ease;
}

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

.floating-cta .cta-button {
    padding: 18px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(10, 61, 61, 0.4);
    animation: pulseGlow 2s infinite;
}

.floating-cta .cta-button:hover {
    animation: shake 0.5s;
}

/* ========================================
   10. SCROLL PROGRESS BAR
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #0A3D3D, #FFD700, #4A6B5B);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========================================
   11. SECTION TRANSITION
   ======================================== */

.section {
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    transition: left 0.8s ease;
}

.section.active::before {
    left: 100%;
}

/* ========================================
   12. RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    /* アニメーション軽減（モバイルパフォーマンス） */
    .clinic-card:hover {
        transform: translateY(-8px);
    }
    
    .floating-cta {
        bottom: 90px; /* モバイルCTAボタン（電話予約・LINE予約）との重複回避 */
        right: 15px;
    }
    
    .floating-cta .cta-button {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    /* prefers-reduced-motionユーザーへの配慮 */
    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* ========================================
   13. HOVER GLOW EFFECTS
   ======================================== */

.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
}

/* ========================================
   14. COUNTER ANIMATION
   ======================================== */

.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0A3D3D;
    display: inline-block;
}

.counter-label {
    font-size: 1rem;
    color: #4A5568;
    margin-top: 5px;
}

/* ========================================
   15. LOADING SHIMMER (for dynamic content)
   ======================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}
