/* 底部区域样式 - 按照 `/public/api/template06/commoncss/root.css` 多端兼容响应式布局 */

/* 底部整体样式 */
.main-footer {
    position: relative;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 上布局1 - 主要内容区域 */
.footer-top {
    position: relative;
    min-height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.9));
    color: #ffffff;
    padding: 60px 0 40px;
    z-index: 1;
}

/* 背景图样式 */
.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -1;
    filter: brightness(0.5) contrast(1.2);
}

/* 内容容器 - 关键修改：参考顶部导航栏的布局方式 */
.footer-container {
    max-width: 100%; /* 参考顶部导航栏 */
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--screen-padding-1920); /* 使用CSS变量，与顶部导航栏一致 */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 330px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* 左侧部分A - 分类导航 - 关键修改：使用flex填充空间 */
.footer-left {
    flex: 1; /* 关键：填充剩余空间 */
    min-width: 0; /* 关键：允许收缩 */
    overflow: visible;
    width: auto;
    box-sizing: border-box;
    /* 调试：查看实际宽度 */
    /* border: 1px solid red; */
}

.category-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between; /* 均匀分布 */
    align-items: flex-start;
    gap: 40px;
    margin-top: 10px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    /* 调试：查看实际宽度 */
    /* background: rgba(255, 0, 0, 0.1); */
}

/* 分类项目 - 确保平均分配空间 */
.category-item {
    flex: 1; /* 关键：平均分配父容器的空间 */
    min-width: 0; /* 关键：允许收缩 */
    transition: transform var(--transition-normal) var(--ease-out);
    padding: 0 10px;
    box-sizing: border-box;
    /* 调试：查看实际宽度 */
    /* background: rgba(0, 255, 0, 0.1); */
}

/* 如果有4个分类项目，每个占25% */
.category-item:nth-child(1) { flex: 1 1 25%; }
.category-item:nth-child(2) { flex: 1 1 25%; }
.category-item:nth-child(3) { flex: 1 1 25%; }
.category-item:nth-child(4) { flex: 1 1 25%; }

.category-item:hover {
    transform: translateY(-5px);
}

/* 主分类标题 */
.category-title {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: var(--font-size-1920);
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    position: relative;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.category-link {
    color: inherit;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-fast) ease;
    width: 100%;
    white-space: normal;
    box-sizing: border-box;
}

.category-link:hover {
    color: #9AB1ED;
}

.category-hover-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9AB1ED, #4271EB);
    transition: width var(--transition-normal) var(--ease-out);
}

.category-link:hover .category-hover-effect {
    width: 100%;
}

/* 子分类列表 */
.subcategory-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.subcategory-item {
    margin-bottom: 12px;
    opacity: 0.8;
    transform: translateX(0);
    transition: all var(--transition-fast) ease;
    width: 100%;
    box-sizing: border-box;
}

.subcategory-item:hover {
    opacity: 1;
    transform: translateX(5px);
}

.subcategory-link {
    display: flex;
    align-items: flex-start;
    color: #e0e0e0;
    text-decoration: none;
    font-size: var(--font-size-1440);
    padding: 4px 0;
    position: relative;
    transition: color var(--transition-fast) ease;
    width: 100%;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    box-sizing: border-box;
}

.subcategory-link:hover {
    color: #ffffff;
}

.subcategory-bullet {
    color: #9AB1ED;
    margin-right: 8px;
    font-weight: bold;
    font-size: calc(var(--font-size-1440) + 2px);
    flex-shrink: 0;
    line-height: 1.4;
    margin-top: 1px;
}

.subcategory-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: block;
    box-sizing: border-box;
}

.subcategory-hover-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #9AB1ED;
    transition: width var(--transition-normal) var(--ease-out);
}

.subcategory-link:hover .subcategory-hover-effect {
    width: 100%;
}

/* 右侧部分B - 联系信息 - 明确固定宽度 */
.footer-right {
    flex: 0 0 310px; /* 关键：固定宽度，不伸缩 */
    width: 440px;
    min-width: 440px;
    max-width: 440px;
    box-sizing: border-box;
    /* 调试：查看实际宽度 */
    /* border: 1px solid blue; */
}

.contact-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
}

/* 左侧联系信息 */
.contact-left {
    flex: 1;
    margin-right: 30px;
    min-width: 0;
    box-sizing: border-box;
}

.bottom-logo {
    margin-bottom: 25px;
    box-sizing: border-box;
}

.logo-image {
    max-width: 180px;
    height: auto;
    filter: brightness(1.1);
    transition: transform var(--transition-normal) var(--ease-out);
    box-sizing: border-box;
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo-placeholder {
    width: 180px;
    height: 60px;
    background: linear-gradient(135deg, #4271EB, #9AB1ED);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.logo-text {
    color: white;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 联系电话样式 */
.contact-phone {
    margin-top: 15px;
    box-sizing: border-box;
}

.phone-label {
    margin: 0 0 8px 0;
    font-size: var(--font-size-1366);
    color: #cccccc;
    opacity: 0.9;
}

.phone-number {
    display: inline-block;
    font-size: var(--font-size-1920);
    font-weight: 600;
    color: #9AB1ED;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(154, 177, 237, 0.1);
    border-radius: 8px;
    transition: all var(--transition-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.phone-number:hover {
    color: #ffffff;
    background: rgba(154, 177, 237, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(154, 177, 237, 0.3);
}

.phone-hover-effect {
    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.6s ease;
}

.phone-number:hover .phone-hover-effect {
    left: 100%;
}

/* 右侧二维码 */
.contact-right {
    flex-shrink: 0;
    box-sizing: border-box;
}

.qrcode-section {
    text-align: center;
    box-sizing: border-box;
}

.qrcode-container {
    width: 140px;  /* 从120px改为140px */
    height: 140px; /* 从120px改为140px */
    margin: 0 auto 12px;
    padding: 10px; /* 保持10px内边距，所以二维码实际是120px */
    background: white;
    border-radius: 12px; /* 稍微增大圆角 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal) var(--ease-out);
    box-sizing: border-box;
}

.qrcode-container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* 二维码图片 */
.qrcode-image {
    width: 120px !important;  /* 固定120px */
    height: 120px !important; /* 固定120px */
    object-fit: contain;
    border-radius: 8px; /* 稍微增大圆角 */
    box-sizing: border-box;
}

/* 二维码占位符 */
.qrcode-placeholder {
    width: 120px !important;
    height: 120px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    border-radius: 8px;
    color: #333;
    box-sizing: border-box;
}

/* 生成的二维码canvas也需要调整 */
#generatedQrcode canvas {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
}

.qrcode-text {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.qrcode-desc {
    font-size: 12px;
    opacity: 0.7;
}

.qrcode-desc {
    margin: 0;
    font-size: var(--font-size-1280);
    color: #cccccc;
    opacity: 0.9;
}

/* 地址信息 */
.address-info {
    padding: 15px 0;
    width: 100%;
    box-sizing: border-box;
}

.address-text {
    margin: 0;
    font-size: var(--font-size-1440);
    line-height: 1.6;
    color: #cccccc;
    width: 100%;
    box-sizing: border-box;
}

.address-label {
    color: #9AB1ED;
    font-weight: 500;
}

.address-content {
    opacity: 0.9;
}

/* 下布局2 - 版权信息 */
.footer-bottom {
    background-color: #000000;
    padding: 15px 0;
    box-sizing: border-box;
}

.footer-bottom-container {
    max-width: 100%; /* 参考顶部导航栏 */
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--screen-padding-1920); /* 使用CSS变量，与顶部导航栏一致 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.copyright-text {
    margin: 0;
    font-size: var(--font-size-1280);
    color: #999999;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

.copyright {
    opacity: 0.8;
}

.domain-separator {
    opacity: 0.5;
}

.domain-link {
    color: #9AB1ED;
    text-decoration: none;
    transition: all var(--transition-fast) ease;
    opacity: 0.9;
}

.domain-link:hover {
    color: #ffffff;
    opacity: 1;
    text-decoration: underline;
}

/* 备案信息 */
.icp-link {
    color: #999999;
    text-decoration: none;
    font-size: var(--font-size-1280);
    padding: 5px 10px;
    border-radius: 4px;
    transition: all var(--transition-normal) ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}

.icp-link:hover {
    color: #ffffff;
    background-color: rgba(154, 177, 237, 0.1);
}

.icp-hover-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.icp-link:hover .icp-hover-effect {
    left: 100%;
}

/* ==================== 响应式设计 - 与顶部导航栏保持一致 ==================== */

/* 2K屏幕 (2560x1440及以上) */
@media (min-width: 2560px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-2k);
    }
}

/* 2559 - 2301 屏幕 */
@media (max-width: 2559px) and (min-width: 2301px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-2560);
    }
    .footer-container {
        gap: 220px;
    }
}

/* 2300 - 2100 屏幕 */
@media (max-width: 2300px) and (min-width: 2100px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-2100);
    }
    .footer-container {
        gap: 300px;
    }
}


/* 1921x1080 -  2099 屏幕 */
@media (max-width: 2099px) and (min-width: 1921px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-1680);
    }
    .footer-container {
        gap: 260px;
    }
}

/* 1680x1050 屏幕 */
@media (max-width: 1920px) and (min-width: 1680px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-1680);
    }

    .footer-container {
        gap: 200px;
    }
}

/* 1600x1024 屏幕 */
@media (max-width: 1679px) and (min-width: 1600px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-1600);
    }

    .footer-container {
        gap: 160px;
    }
}

/* 1440x900 屏幕 */
@media (max-width: 1599px) and (min-width: 1440px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-1440);
    }

    .footer-container {
        gap: 100px;
    }
}

/* 1366x768 屏幕 */
@media (max-width: 1439px) and (min-width: 1366px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-1366);
    }

    .footer-container {
        gap: 140px;
    }
}

/* 1280x800 屏幕 */
@media (max-width: 1365px) and (min-width: 1280px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-1366);
    }
    
    .footer-right {
        flex: 0 0 320px;
        width: 400px;
        min-width: 400px;
        max-width: 400px;
    }

    .footer-container {
        gap: 110px;
    }
}

/* 1024x768 屏幕 */
@media (max-width: 1279px) and (min-width: 1024px) {
    .footer-container,
    .footer-bottom-container {
        padding: 0 var(--screen-padding-1024);
    }
    
    .footer-right {
        flex: 0 0 300px;
        width: 360px;
        min-width: 360px;
        max-width: 360px;
    }
    
    .category-nav {
        gap: 20px;
    }

    .footer-container {
        gap: 80px;
    }
}

/* 平板和移动端样式 - 参考顶部导航栏的响应式 */
@media (max-width: 1023px) {
    .footer-container {
        padding: 0 var(--screen-padding-mobile);
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-bottom-container {
        padding: 0 var(--screen-padding-mobile);
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-left, .footer-right {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex: 0 0 auto;
    }
    
    .footer-right {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .contact-info {
        max-width: 400px;
        margin: 0 auto 30px;
    }
    
    .category-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 20px;
    }
    
    .category-item {
        flex: 0 0 calc(24% - 14px) !important;
        margin-bottom: 30px;
        max-width: calc(24% - 14px);
    }
    
    .category-title {
        font-size: var(--font-size-1440);
    }

    .qrcode-container {
        width: 140px;  /* 平板端稍小 */
        height: 140px;
        padding: 8px;
    }
    
    .qrcode-image,
    .qrcode-placeholder,
    #generatedQrcode canvas {
        width: 124px !important;  /* 140-16=124px */
        height: 124px !important;
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding: 40px 0 30px;
        min-height: auto;
    }
    
    .footer-container {
        padding: 0 var(--screen-padding-mobile);
        gap: 30px;
    }
    
    .footer-bottom-container {
        padding: 0 var(--screen-padding-mobile);
    }
    
    .category-nav {
        gap: 15px;
        justify-content: space-between;
    }
    
    .category-item {
        flex: 0 0 calc(50% - 8px) !important;
        min-width: auto;
        margin-bottom: 25px;
        max-width: calc(50% - 8px);
        padding: 0 2px;
    }
    
    .category-nav {
        gap: 10px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 300px;
    }
    
    .contact-left {
        margin-right: 0;
        margin-bottom: 25px;
    }
    
    .bottom-logo {
        margin-bottom: 20px;
    }
    
    .logo-image {
        max-width: 150px;
    }
    
    .phone-number {
        font-size: var(--font-size-mobile);
    }
    
    .qrcode-container {
        width: 140px;
        height: 140px;
        padding: 7px;
    }
    
    .qrcode-image,
    .qrcode-placeholder,
    #generatedQrcode canvas {
        width: 126px !important;  /* 140-14=126px */
        height: 126px !important;
    }
    
    .copyright-text {
        flex-direction: column;
        gap: 5px;
    }
    
    .domain-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .category-nav {
        /* flex-direction: column;
        flex-wrap: nowrap;
        gap: 25px;
        width: 100%; */
    }
    
    .category-item {
        flex: 0 0 100% !important;
        /* width: 100%; */
        margin-bottom: 20px;
        /* max-width: 100%; */
        padding: 0;
    }
    
    .category-title {
        font-size: var(--font-size-mobile);
        text-align: center;
    }
    
    .category-link {
        text-align: center;
    }
    
    .subcategory-list {
        text-align: center;
    }
    
    .subcategory-link {
        font-size: var(--font-size-mobile-small);
        justify-content: center;
    }
    
    .phone-number {
        font-size: var(--font-size-mobile);
        padding: 6px 12px;
    }
    
    .address-text {
        font-size: var(--font-size-mobile-small);
        text-align: center;
    }
    
    .copyright-text, .icp-link {
        font-size: var(--font-size-mobile-small);
    }

    .qrcode-container {
        width: 100px;
        height: 100px;
        padding: 6px;
    }
    
    .qrcode-image,
    .qrcode-placeholder,
    #generatedQrcode canvas {
        width: 88px !important;  /* 100-12=88px */
        height: 88px !important;
    }

    .contact-right {
        display: none;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }

/* 打印样式 */
@media print {
    .main-footer {
        background: white !important;
        color: black !important;
    }
    
    .footer-bg {
        display: none;
    }
    
    .phone-number, .domain-link, .icp-link {
        color: black !important;
        text-decoration: none !important;
    }
}