/* ========================================
   Footer Styles - foot.css
   复旦管院 Footer 样式
   ======================================== */

/* Footer 容器 */
#footerbox {
    background: #002a93;
    color: #fff;
}

.page-footer {
    padding: 60px 0 30px;
}

.max-content-width {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 主内容区 - 三列布局 */
.page-footer__content {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 50px;
}

/* 左侧区域 - Logo + 地址 */
.footer__left {
    flex: 0 0 280px;
}

.footer-logo {
    display: block;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 60px;
    width: auto;
}

.footer__left .info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__left .info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.footer__left .icon-address {
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231fdfff"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>') center/contain no-repeat;
    flex-shrink: 0;
    margin-top: 3px;
}

.footer__left .info section p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.footer__left .info section p:first-child {
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

/* 中间区域 - 导航 */
.footer__center {
    flex: 1;
    display: flex;
    gap: 40px;
    position: relative;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 0 0 160px;
}

.footer-nav li {
    margin-bottom: 16px;
    cursor: pointer;
}

.footer-nav span,
.footer-nav a {
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-nav li:hover span,
.footer-nav li:hover a {
    color: #1fdfff;
}

.footer-nav li.active span,
.footer-nav li.active a {
    color: #1fdfff;
    border-bottom: 1px solid #1fdfff;
    padding-bottom: 2px;
}

/* 子导航 */
.footer-child__navs {
    flex: 1;
    position: relative;
    min-height: 300px;
}

.child-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    animation: fadeIn 0.3s ease;
}

.child-nav.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.child-nav li {
    margin-bottom: 12px;
}

.child-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.child-nav a:hover {
    color: #1fdfff;
}

/* 下拉菜单 */
.child-nav-header {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.child-nav-title {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.icon-arrow-down {
    width: 12px;
    height: 12px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') center/contain no-repeat;
    opacity: 0.7;
}

.nav-menu {
    list-style: none;
    padding: 8px 0 0 12px;
    margin: 0;
}

.nav-menu .nav-item {
    margin-bottom: 8px;
}

.nav-menu a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* 右侧区域 - Follow + Giving */
.footer__right {
    flex: 0 0 240px;
}

.follow-box {
    margin-bottom: 24px;
}

.follow-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
    text-align: left;
    padding: 0 8px;
}

.follows {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.follow-item {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.follow-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.follow-item .logo svg {
    width: 26px;
    height: 26px;
    display: block;
}

.follow-item .logo svg rect[stroke],
.follow-item .logo svg path[stroke],
.follow-item .logo svg circle[stroke] {
    stroke: rgba(255, 255, 255, 0.8);
    transition: stroke 0.3s ease;
}

.follow-item .logo svg text,
.follow-item .logo svg path[fill] {
    fill: rgba(255, 255, 255, 0.8);
    transition: fill 0.3s ease;
}

.follow-item:hover .logo svg rect[stroke],
.follow-item:hover .logo svg path[stroke],
.follow-item:hover .logo svg circle[stroke] {
    stroke: #ffffff;
}

.follow-item:hover .logo svg text,
.follow-item:hover .logo svg path[fill] {
    fill: #ffffff;
}

.follow-item .code {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.follow-item .code::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.follow-item:hover .code {
    display: block;
}

.follow-item .code img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* Giving 按钮 */
.btn {
    display: block;
    background: #f59e0b;
    color: #fff;
    padding: 16px 48px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.btn:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.icon-gift-fill {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"/></svg>') center/contain no-repeat;
}

/* 合作伙伴认证图标 */
.partner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.partner-item {
    flex: 0 0 auto;
}

.partner-item .img {
    height: 50px;
    display: flex;
    align-items: center;
}

.partner-item img {
    max-height: 40px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.partner-item:hover img {
    opacity: 1;
}

/* 底部版权信息 */
.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    flex-wrap: wrap;
    gap: 10px;
}

.footer__bottom p {
    margin: 0;
}

.footer__bottom span {
    margin: 0 8px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer__bottom span:hover {
    color: #1fdfff;
}

.m-l-auto {
    margin-left: auto;
        margin-top: 10px;
}

/* ========================================
   响应式设计 - 平板端
   ======================================== */
@media (max-width: 1200px) {
    .page-footer__content {
        gap: 40px;
    }
    
    .footer__center {
        gap: 40px;
    }
    
    .footer-child__navs {
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .page-footer__content {
        flex-wrap: wrap;
        gap: 40px;
    }
    
    .footer__left {
        flex: 0 0 100%;
        display: flex;
        gap: 40px;
        align-items: flex-start;
    }
    
    .footer-logo {
        margin-bottom: 0;
    }
    
    .footer__center {
        flex: 1;
        min-width: 300px;
    }
    
    .footer__right {
        flex: 0 0 100%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 40px;
    }
    
    .follow-box {
        margin-bottom: 0;
    }
}

/* ========================================
   响应式设计 - 手机端
   ======================================== */
@media (max-width: 768px) {
    .page-footer {
        padding: 40px 0 20px;
    }
    
    .max-content-width {
        padding: 0 20px;
    }
    
    .page-footer__content {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .footer__left {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-logo img {
        height: 50px;
    }
    
    .footer__center {
        flex-direction: column;
        gap: 20px;
        display: none;
    }
    
    .footer-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 24px;
        flex: auto;
    }
    
    .footer-nav li {
        margin-bottom: 0;
    }
    
    .footer-child__navs {
        display: block;
        min-height: auto;
        padding-left: 0;
    }
    
    .child-nav {
        display: none;
    }
    
    .child-nav.show {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 20px;
    }
    
    .child-nav li {
        margin-bottom: 0;
    }
    
    .footer__right {
        flex-direction: column;
        gap: 20px;
    }
    
    .follows {
        margin-bottom: 16px;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        max-width: none;
        text-align: center;
    }
    
    .partner {
        gap: 20px;
        padding: 20px 0;
    }
    
    .partner-item .img {
        height: 40px;
    }
    
    .partner-item img {
        max-height: 30px;
    }
    
    .footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .m-l-auto {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .page-footer {
        padding: 30px 0 15px;
    }
    
    .footer-logo img {
        height: 45px;
    }
    
    .footer__left .info li {
        margin-bottom: 16px;
    }
    
    .footer__left .info section p {
        font-size: 13px;
    }
    
    .footer-nav a,
    .footer-nav span {
        font-size: 14px;
    }
    
    .follow-title {
        font-size: 15px;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .footer__bottom {
        font-size: 12px;
    }
}

/* ========================================
   三级导航展开/收起样式
   ======================================== */

/* 二级导航项（带下拉） */
.child-nav .nav-item.has-submenu {
    position: relative;
}

.child-nav .nav-item.has-submenu > .child-nav-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 箭头旋转动画 */
.child-nav .nav-item.has-submenu .icon-arrow-down {
    transition: transform 0.3s ease;
}

.child-nav .nav-item.has-submenu.expanded .icon-arrow-down {
    transform: rotate(180deg);
}

/* 三级导航展开动画 - 覆盖内联 display: none */
.child-nav .nav-item.has-submenu .nav-menu {
    display: block !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0 0 12px;
}

.child-nav .nav-item.has-submenu.expanded .nav-menu {
    max-height: 800px;
    padding: 12px 0 8px 12px;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .child-nav .nav-item.has-submenu.expanded .nav-menu {
        max-height: 800px;
    }
}
