/* --- Product Page Enhancements (v2) --- */

/* 1. Hero Hub Visual (Central Hub Effect) */
.hero-hub-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 82, 217, 0.1) 0%, rgba(0, 82, 217, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-hub-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 82, 217, 0.15);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 82, 217, 0.05);
}

.hero-hub-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    animation: pulse-glow 4s infinite ease-in-out;
}

.hero-hub-circle:nth-child(2) {
    width: 500px;
    height: 500px;
    animation: pulse-glow 4s infinite ease-in-out 1s;
    opacity: 0.6;
}

.hero-hub-circle:nth-child(3) {
    width: 700px;
    height: 700px;
    animation: pulse-glow 4s infinite ease-in-out 2s;
    opacity: 0.3;
}

@keyframes pulse-glow {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 15px rgba(0, 82, 217, 0.05);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.02);
        box-shadow: 0 0 30px rgba(0, 82, 217, 0.15);
    }

    100% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 15px rgba(0, 82, 217, 0.05);
    }
}

/* 2. Process Flow Visualization (Connected Flowchart) */
.process-flow-container {
    position: relative;
    padding: 60px 0;
    margin: 60px 0;
}

.process-flow-line {
    display: none;
    /* Not used, we use CSS pseudo-elements instead */
}

/* Ensure horizontal layout for process flow */
.process-flow-container .row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
}

.process-flow-container .col-md-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    width: 25% !important;
}

.process-step {
    position: relative;
    text-align: center;
    padding: 0 10px;
    z-index: 2;
    width: 100%;
}

.process-icon-box {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

/* Connecting Line (Desktop) - Left to Right Horizontal Layout */
@media (min-width: 768px) {
    .process-flow-container .row {
        position: relative;
    }

    .process-flow-container .col-md-3 {
        position: relative;
    }

    /* Horizontal connecting line from icon center to next icon center */
    .process-step::after {
        content: '';
        position: absolute;
        top: 45px;
        /* Center of icon (90/2) */
        left: calc(50% + 45px);
        /* Start from right edge of icon */
        width: calc(100% - 90px);
        /* Extend to next step, accounting for icon width */
        height: 3px;
        background: var(--border-color);
        z-index: 1;
        transition: all 0.4s ease;
        transform: translateY(-50%);
    }

    /* Hide line for last item */
    .col-md-3:last-child .process-step::after {
        display: none;
    }

    /* Active State for Line */
    .process-step:hover::after {
        background: var(--primary-color);
    }

    /* Arrow head at the end of line */
    .process-step::before {
        content: '\f054';
        /* FontAwesome chevron-right */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        top: 45px;
        left: calc(50% + 45px + calc(100% - 90px) - 15px);
        /* Position at the end of the line */
        transform: translateY(-50%);
        color: var(--border-color);
        background: var(--bg-body);
        /* Mask line */
        padding: 0 8px;
        z-index: 3;
        font-size: 0.9rem;
        transition: all 0.4s ease;
    }

    .col-md-3:last-child .process-step::before {
        display: none;
    }

    .process-step:hover::before {
        color: var(--primary-color);
        transform: translateY(-50%) translateX(2px);
    }
}

.process-step:hover .process-icon-box {
    transform: scale(1.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-surface);
}

.process-step-title {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.process-step:hover .process-step-title {
    color: var(--primary-color);
}

.process-step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Mobile Process Flow */
@media (max-width: 768px) {
    .process-flow-container .row {
        flex-wrap: wrap !important;
        flex-direction: column !important;
    }

    .process-flow-container .col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .process-step {
        margin-bottom: 50px;
        width: 100%;
    }

    .process-step::after {
        content: '';
        position: absolute;
        top: 90px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 50px;
        background: var(--border-color);
        z-index: 1;
    }

    .process-flow-container .col-md-3:last-child .process-step::after {
        display: none;
    }
}


/* 3. Premium Agent Cards (Enhanced) */
.agent-card-premium {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Top accent line */
.agent-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-card-premium:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 82, 217, 0.4);
}

.agent-card-premium:hover::before {
    opacity: 1;
}

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    /* Squircle */
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.agent-card-premium:hover .agent-avatar {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: rotate(-5deg) scale(1.05);
}

.agent-role-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.agent-card-premium:hover .agent-role-badge {
    background: rgba(0, 82, 217, 0.1);
    color: var(--primary-color);
    border-color: rgba(0, 82, 217, 0.2);
}

.agent-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.agent-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.agent-feature-list li {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.agent-feature-list li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 0.8rem;
}


/* 4. Key Tools (Enhanced) */
.tool-card-enhanced {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    height: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

/* Ensure spacing for tool cards in row */
.row.g-4 .tool-card-enhanced {
    margin-bottom: 0;
}

.tool-card-enhanced:hover {
    border-color: var(--primary-color);
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(0, 82, 217, 0.05) 100%);
    transform: translateY(-5px);
}

.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.tool-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-main);
    margin-right: 15px;
    transition: all 0.3s ease;
}

.tool-card-enhanced:hover .tool-icon-box {
    background: var(--primary-color);
    color: #fff;
}

.tool-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.tool-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* 5. Scenario Grid (Refined) */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 0;
}

/* Add top margin for scenario section */
.scenario-section {
    margin-top: 60px !important;
    padding-top: 60px !important;
}

/* Add top margin for key tools section */
.key-tools-section {
    margin-top: 60px !important;
    padding-top: 60px !important;
}

.scenario-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.scenario-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.scenario-item:hover {
    background: var(--bg-surface);
    transform: translateY(-5px);
}

.scenario-item:hover::after {
    transform: scaleX(1);
}

.scenario-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.scenario-item:hover .scenario-icon {
    color: var(--primary-color);
    transform: scale(1.1) rotate(5deg);
}

.scenario-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* 6. Video Play Button (Enhanced) */
.video-play-button-wrapper {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-play-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0066FF 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 82, 217, 0.3),
                0 0 0 0 rgba(0, 82, 217, 0.4);
    overflow: hidden;
    z-index: 1;
}

.video-play-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 ease, height 0.6s ease;
    z-index: -1;
}

.video-play-button:hover::before {
    width: 300px;
    height: 300px;
}

.video-play-button::after {
    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.5s ease;
}

.video-play-button:hover::after {
    left: 100%;
}

.video-play-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 82, 217, 0.5),
                0 0 0 8px rgba(0, 82, 217, 0.1);
    background: linear-gradient(135deg, #0066FF 0%, var(--primary-color) 100%);
}

.video-play-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 15px rgba(0, 82, 217, 0.4);
}

.video-play-icon {
    position: relative;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.video-play-icon i {
    font-size: 1.1rem;
    margin-left: 3px; /* 微调播放图标位置，使其视觉居中 */
    transition: transform 0.3s ease;
}

.video-play-button:hover .video-play-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.video-play-button:hover .video-play-icon i {
    transform: scale(1.1);
}

.video-play-text {
    position: relative;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.video-play-button:hover .video-play-text {
    letter-spacing: 1px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-play-button {
        padding: 14px 32px;
        font-size: 0.95rem;
    }
    
    .video-play-icon {
        width: 42px;
        height: 42px;
    }
    
    .video-play-icon i {
        font-size: 1rem;
    }
}

/* 7. Video Modal (Enhanced) */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.video-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-modal-overlay.active .video-modal-content {
    transform: scale(1) translateY(0);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    background: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-modal-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.1);
    opacity: 1;
}

.close-modal-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.close-modal-btn i {
    font-size: 18px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .video-modal-overlay {
        padding: 10px;
    }
    
    .video-modal-content {
        width: 100%;
        border-radius: 12px;
    }
    
    .close-modal-btn {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .close-modal-btn i {
        font-size: 16px;
    }
    
    .video-wrapper {
        padding-bottom: 56.25%; /* 保持16:9比例 */
    }
}

/* 小屏幕设备 */
@media (max-width: 480px) {
    .video-modal-overlay {
        padding: 0;
    }
    
    .video-modal-content {
        border-radius: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
    
    .video-wrapper {
        padding-bottom: 56.25%;
        height: auto;
    }
    
    .close-modal-btn {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
}