/**
 * 联系面板通用样式
 * 适用于: /index/roboticsinstitute, /index/robot4s, /index/industrialtourism
 * 各页面需自定义位置样式 (position, top/bottom, left/right 等)
 */

/* =========================
   联系信息面板 - 基础样式
   ========================= */
.contact-panel {
    position: absolute;
    z-index: 99;
    width: 90%;
    max-width: min(950px, calc(950 / 1414 * 100vw));
    height: min(79px, calc(79 / 1414 * 100vw));
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-panel.active {
    opacity: 1;
    visibility: visible;
}

/* 联系信息面板背景 */
.contact-panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.contact-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 联系信息容器 */
.contact-info-container {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: min(10px, calc(10 / 1414 * 100vw)) min(70px, calc(70 / 1414 * 100vw));
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: min(10px, calc(10 / 1414 * 100vw));
    border: min(1px, calc(1 / 1414 * 100vw)) solid #002BFF;
    box-sizing: border-box;
}

/* 单个联系信息项 */
.contact-info-container .contact-item {
    text-align: center;
    padding: 0 min(70px, calc(70 / 1414 * 100vw));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    white-space: nowrap;
}

/* 第二个item左右两侧加白色线 */
.contact-info-container .contact-item:nth-child(2) {
    position: relative;
    height: min(54px, calc(54 / 1414 * 100vw));
}

.contact-info-container .contact-item:nth-child(2)::before,
.contact-info-container .contact-item:nth-child(2)::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: min(54px, calc(54 / 1414 * 100vw));
    background-color: #FFFFFF;
}

.contact-info-container .contact-item:nth-child(2)::before {
    left: 0;
}

.contact-info-container .contact-item:nth-child(2)::after {
    right: 0;
}

.contact-info-container .contact-label {
    font-size: min(12px, calc(12 / 1414 * 100vw));
    font-weight: 300;
    color: #FFFFFF;
    text-shadow: 0 min(2px, calc(2 / 1414 * 100vw)) min(8px, calc(8 / 1414 * 100vw)) rgba(0, 0, 0, 0.5);
    display: block;
    white-space: nowrap;
    line-height: 1.5;
}

.contact-info-container .contact-value {
    font-size: min(12px, calc(12 / 1414 * 100vw));
    font-weight: 200;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    text-shadow: 0 min(1px, calc(1 / 1414 * 100vw)) min(4px, calc(4 / 1414 * 100vw)) rgba(0, 0, 0, 0.3);
    display: block;
    white-space: nowrap;
}

/* =========================
   机器人图标触发器
   ========================= */
.robot-icon-trigger {
    position: absolute;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: robotFloat 3s ease-in-out infinite;
}

.robot-icon-trigger:hover {
    transform: scale(1.1);
}

.robot-icon {
    width: auto;
    height: auto;
    max-width: min(200px, calc(200 / 1414 * 100vw));
    max-height: min(200px, calc(200 / 1414 * 100vw));
    display: block;
}

/* 机器人浮动动画 */
@keyframes robotFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(min(-15px, calc(-15 / 1414 * 100vw)));
    }
}

/* =========================
   响应式设计
   ========================= */
@media (max-width: 1024px) {
    .contact-panel {
        width: 95%;
        max-width: 800px;
    }

    .contact-info-container {
        padding: 0 min(40px, calc(40 / 1414 * 100vw));
    }

    .contact-info-container .contact-item {
        padding: 0 min(40px, calc(40 / 1414 * 100vw));
    }

    .robot-icon-trigger {
        right: 5%;
    }

    .robot-icon {
        max-width: min(150px, calc(150 / 1414 * 100vw));
        max-height: min(150px, calc(150 / 1414 * 100vw));
    }
}

@media (max-width: 768px) {
    .contact-panel {
        width: 95%;
        max-width: 500px;
        height: auto;
        min-height: min(79px, calc(79 / 1414 * 100vw));
    }

    .contact-info-container {
        padding: min(15px, calc(15 / 1414 * 100vw)) min(20px, calc(20 / 1414 * 100vw));
        flex-direction: column;
        gap: min(15px, calc(15 / 1414 * 100vw));
        height: auto;
    }

    .contact-info-container .contact-item {
        height: auto;
        padding: 0;
    }

    .contact-info-container .contact-item:nth-child(2) {
        height: auto;
    }

    .contact-info-container .contact-item:nth-child(2)::before,
    .contact-info-container .contact-item:nth-child(2)::after {
        display: none;
    }

    .contact-label {
        font-size: min(16px, calc(16 / 1414 * 100vw));
        margin-bottom: min(4px, calc(4 / 1414 * 100vw));
    }

    .contact-value {
        font-size: min(13px, calc(13 / 1414 * 100vw));
    }

    .robot-icon-trigger {
        right: 3%;
    }

    .robot-icon {
        max-width: min(120px, calc(120 / 1414 * 100vw));
        max-height: min(120px, calc(120 / 1414 * 100vw));
    }
}

@media (max-width: 480px) {
    .contact-info-container {
        padding: min(12px, calc(12 / 1414 * 100vw)) min(15px, calc(15 / 1414 * 100vw));
        gap: min(12px, calc(12 / 1414 * 100vw));
    }

    .contact-label {
        font-size: min(14px, calc(14 / 1414 * 100vw));
    }

    .contact-value {
        font-size: min(12px, calc(12 / 1414 * 100vw));
    }

    .robot-icon {
        max-width: min(100px, calc(100 / 1414 * 100vw));
        max-height: min(100px, calc(100 / 1414 * 100vw));
    }
}
