/* 
   Common Styles for RunMan Website
   Contains: Typography, Layout, TopBar, Navbar, MegaMenu, Footer
*/

/* 1. Global Styles */
body {
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    position: relative;
    padding-top: 0; /* Navbar has margin-top instead */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Section Styles */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 700;
}

.section-title .gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Button Styles */
.btn-primary-gradient {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 2. Top Announcement Bar (Epimedii Style) */
.top-bar {
    background: var(--gradient-primary); /* Gradient background */
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1060;
    transition: transform 0.3s ease;
}

.announcement-slider {
    height: 24px; /* Fixed height */
    overflow: hidden;
    position: relative;
    text-align: center;
}

.announcement-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-item.active {
    opacity: 1;
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #fff;
}

/* 3. Navbar (Qulix style - Light Mode) */
.navbar {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0; /* Remove vertical padding to let height control */
    transition: all 0.3s ease;
    margin-top: 40px; /* Space for top bar */
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: 80px; /* Fixed height */
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    height: 70px; /* Shrink */
}

/* When top bar is closed, remove margin */
body.top-bar-closed .navbar {
    margin-top: 0;
}

.navbar-brand {
    padding: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-brand img {
    height: 70px; /* Increased size */
    width: auto;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 60px; /* Scrolled size */
}

.navbar-brand span {
    color: var(--primary-color) !important;
}

.navbar-nav {
    height: 100%;
}

.navbar-nav .nav-item {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 600;
    padding: 0 12px !important; /* Reduced padding to prevent crowding */
    position: relative;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
    white-space: nowrap; /* Force text to stay on one line */
}

/* Remove Underline */
.navbar-nav .nav-link::after {
    display: none;
}

/* Arrow for Dropdown */
.navbar-nav .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-nav .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* 4. Mega Menu Styles */
/* Mobile First / Default Styles (Simple Dropdown) */
.navbar .dropdown-menu.megamenu {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.megamenu-links {
    padding: 10px 15px;
    background: transparent;
}

.megamenu-links h5 {
    display: none; /* Hide category title on mobile */
}

/* Desktop Styles (Mega Menu) - Only apply above 1200px */
@media (min-width: 1200px) {
    .navbar .dropdown-menu.megamenu {
        width: 100%;
        margin-top: 0;
        border: none;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        padding: 0;
        background: #fff;
        overflow: hidden;
        animation: fadeIn 0.3s ease;
        left: 50%;
        transform: translateX(-50%);
        min-height: 400px;
        top: 100%;
        border-top: 1px solid rgba(0,0,0,0.05);
        position: absolute; /* Absolute only on desktop */
        display: block;
        visibility: hidden;
        opacity: 0;
        transition: all 0.2s ease;
    }

    /* Only main navbar dropdowns should be static for mega menu */
    .navbar-nav .dropdown {
        position: static;
    }
    
    /* Limit width to container size */
    .navbar .dropdown-menu.megamenu {
        width: 1140px; /* XL Container width */
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .navbar .dropdown:hover .dropdown-menu.megamenu {
        visibility: visible;
        opacity: 1;
        transform: translateX(-50%);
    }

    .megamenu-links {
        padding: 40px;
        background-color: #f8f9fa;
    }

    .megamenu-links h5 {
        display: block;
    }
}

@media (min-width: 1400px) {
    .navbar .dropdown-menu.megamenu {
        width: 1320px; /* XXL Container width */
    }
}

/* Mobile Navigation Adjustments */
@media (max-width: 1199.98px) {
    /* Top Bar Adjustments for Mobile */
    .top-bar {
        height: auto;
        padding: 8px 0;
    }
    
    .announcement-slider {
        height: auto;
        min-height: 24px;
    }
    
    .announcement-item {
        position: relative; /* Change from absolute to relative for mobile auto-height */
        height: auto;
        padding: 0 30px; /* Space for close button */
        line-height: 1.4;
        display: none; /* Hide all by default */
    }
    
    .announcement-item.active {
        display: block; /* Show active one */
        transform: none;
        opacity: 1;
    }

    .navbar-collapse {
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-top: 1px solid rgba(0,0,0,0.05);
        max-height: 80vh;
        overflow-y: auto;
    }

    .navbar-nav .nav-link {
        padding: 12px 0 !important;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        justify-content: space-between; /* Arrow to right */
        display: flex;
        width: 100%;
    }

    /* FORCE STATIC POSITIONING - SUPER SPECIFIC RESET */
    .navbar-nav .dropdown-menu,
    .navbar .dropdown-menu.megamenu {
        position: static !important;
        float: none !important;
        transform: none !important; /* Disable Popper.js */
        inset: auto !important; /* Disable Bootstrap 5 inset */
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 5px 0 5px 20px !important; /* Indent children */
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        display: none; /* Controlled by .show */
        opacity: 1 !important;
        visibility: visible !important;
        animation: none !important;
    }

    .navbar-nav .dropdown-menu.show,
    .navbar .dropdown-menu.megamenu.show {
        display: block !important;
    }

    .menu-link {
        padding: 10px 0;
        border-bottom: 1px solid rgba(0,0,0,0.03);
        display: flex;
        align-items: center;
        color: var(--text-secondary);
    }
    
    .menu-link:hover, .menu-link.active {
        background: transparent;
        padding-left: 5px;
        color: var(--accent-color);
    }

    .megamenu-links {
        padding: 0;
        background: transparent;
    }
}

/* Mega Menu Content Styles */
.megamenu-image {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 400px;
}

/* Mega Menu Video Background */
.megamenu-image-with-video {
    position: relative;
    overflow: hidden;
}

.megamenu-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) translateZ(0); /* 启用硬件加速，提升渲染质量 */
    z-index: 0;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
    /* 优化视频渲染质量，确保清晰度 */
    will-change: opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.megamenu-video-bg.loaded {
    opacity: 1;
    /* 视频加载成功后，确保清晰渲染 */
    filter: contrast(1.05) brightness(1.02); /* 轻微增强对比度和亮度 */
}

/* 视频加载成功后，减少遮罩层和文字背景的影响，让视频更清晰 */
.megamenu-image-with-video.video-loaded::after {
    opacity: 0.15; /* 进一步降低遮罩层透明度 */
}

.megamenu-image-with-video.video-loaded .megamenu-image-content {
    backdrop-filter: blur(1px); /* 减少模糊效果 */
    -webkit-backdrop-filter: blur(1px);
    background: linear-gradient(135deg, rgba(234, 38, 47, 0.3) 0%, rgba(255, 182, 193, 0.3) 100%); /* 降低背景透明度 */
}

/* Ensure content stays above video */
.megamenu-image-content {
    position: relative;
    z-index: 2;
}

/* Light overlay for video backgrounds - subtle and transparent */
.megamenu-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.25; /* Reduced from 0.85 to make it lighter */
    mix-blend-mode: multiply;
    z-index: 1;
    pointer-events: none;
}

.megamenu-image-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* 添加半透明背景，防止视频加载失败时文字与logo重叠 */
    background: linear-gradient(135deg, rgba(234, 38, 47, 0.4) 0%, rgba(255, 182, 193, 0.4) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 0;
}

.megamenu-image-content h4 {
    font-weight: 700;
    margin-bottom: 15px;
}

.megamenu-links {
    padding: 40px;
    background-color: #f8f9fa;
}

.megamenu-links h5 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 20px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.menu-link:hover,
.menu-link.active {
    background-color: rgba(99, 102, 241, 0.08); /* Light primary color */
    color: var(--primary-color);
    padding-left: 25px;
}

.menu-link i {
    font-size: 12px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.menu-link:hover i,
.menu-link.active i {
    opacity: 1;
    transform: translateX(0);
}

.megamenu-details {
    padding: 40px;
    background: #fff;
}

.menu-desc {
    display: none;
    animation: fadeIn 0.3s ease;
}

.menu-desc.active {
    display: block;
}

.menu-desc h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 15px;
}

.menu-desc p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.menu-desc .btn-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.menu-desc .btn-link:hover {
    color: var(--accent-color);
}

/* Image Lazy Loading Styles */
img.lazy-img {
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

img.lazy-img.lazy-loaded {
    opacity: 1;
    background: none;
    animation: none;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 4.5. Breadcrumb Navigation Styles */
/* 面包屑导航色条 - 通用样式，适用于所有页面 */
.breadcrumb-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
}

.breadcrumb-section .breadcrumb {
    margin-bottom: 0;
    background: transparent;
}

.breadcrumb-section .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: #ffffff;
}

.breadcrumb-section .breadcrumb-item.active {
    color: #ffffff;
}

.breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
    content: "/";
}

/* 5. Footer Styles (Dockyard Style) */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 30px 0 30px;
    margin-top: auto;
}

footer h5 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-weight: 700;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

.social-icons a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.copyright {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 14px;
}

/* Language Switcher Helpers */
.hover-opacity-100:hover {
    opacity: 1 !important;
}
.transition-all {
    transition: all 0.3s ease;
}

/* Language Dropdown Hover Effect */
@media (min-width: 992px) {
    .language-dropdown {
        position: relative;
        height: auto; /* Auto height to wrap icon */
        display: flex;
        align-items: center;
        padding: 10px 0; /* Add vertical padding for touch target */
    }
    
    .language-dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeInCentered 0.2s ease;
        top: 100%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        margin-top: 5px; /* Small gap */
        min-width: 180px; /* Wider menu */
    }
    
    /* Transparent bridge to prevent menu closing when moving mouse */
    .language-dropdown:hover::after {
        content: '';
        position: absolute;
        top: 80%;
        left: -20%;
        width: 140%;
        height: 40px;
        background: transparent;
        z-index: 1;
    }
}

@keyframes fadeInCentered {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.language-dropdown .dropdown-toggle::after {
    display: none; /* Hide default arrow */
}

.language-dropdown .dropdown-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.language-dropdown .dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
}

/* Utility Classes */
.tracking-wider {
    letter-spacing: 2px;
}

/* Custom Navbar Adjustments for Many Items */
/* These styles help accommodate multiple navigation items */
@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        padding: 0 8px !important; /* Reduce padding */
        font-size: 14px; /* Slightly smaller font */
    }
}

@media (min-width: 1400px) {
    .navbar-nav .nav-link {
        padding: 0 12px !important;
        font-size: 15px;
    }
}

/* Dropdown Menu Styling */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
}

/* =========================================
   6. Hero Slider (Epimedii Style)
   ========================================= */
/* Hero styles moved to hero-epimedii.css - see css/hero-epimedii.css */

/* =========================================
   Safari 视频兼容性修复
   ========================================= */
.megamenu-video-bg {
    -webkit-transform: translate(-50%, -50%) translateZ(0);
    display: block;
}

.megamenu-video-bg.loaded {
    opacity: 1 !important;
}

/* Safari 特定修复：确保视频可见 */
@supports (-webkit-appearance: none) {
    .hero-video-bg.loaded,
    .hero-video-bg[data-loaded="true"],
    .fullscreen-video.loaded,
    .fullscreen-video[data-loaded="true"] {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* =========================================
   7. 友情链接 Section
   ========================================= */
.friendship-links-section {
    width: 100%;
    position: relative;
}

.friendship-links-bg {
    width: 100%;
    background-color: #f1f5f9;
    padding: 40px 0 0;
}

.friendship-links-content {
    padding-bottom: 15px;
}

.friendship-links-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.friendship-links-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
    font-weight: 600;
    padding: 8px;
    box-sizing: border-box;
    gap: 2px;
}

.friendship-links-icon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1rem;
    line-height: 1;
}

.friendship-links-icon-row span {
    display: inline-block;
}

.friendship-links-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friendship-links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.friendship-link-item {
    flex: 0 0 calc(10% - 0px);
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 400;
    padding: 8px 10px;
    text-align: center;
    position: relative;
    display: inline-block;
    line-height: 1.6;
    font-size: 0.9rem;
}

.friendship-link-item:hover {
    color: var(--primary-color);
    text-decoration: underline;
    background-color: rgba(139, 92, 246, 0.05);
}

.friendship-links-bottom-line {
    width: 100%;
    height: 1px;
    background-color: #cbd5e1;
    margin-top: 0;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .friendship-link-item {
        flex: 0 0 calc(12.5% - 0px);
    }
}

@media (max-width: 1200px) {
    .friendship-link-item {
        flex: 0 0 calc(16.666% - 0px);
    }
}

@media (max-width: 992px) {
    .friendship-link-item {
        flex: 0 0 calc(20% - 0px);
    }
}

@media (max-width: 768px) {
    .friendship-links-bg {
        padding: 30px 0 0;
    }
    
    .friendship-links-content {
        padding-bottom: 12px;
    }
    
    .friendship-links-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .friendship-links-icon {
        width: 70px;
        height: 70px;
    }
    
    .friendship-links-icon-row {
        font-size: 1rem;
    }
    
    .friendship-links-grid {
        gap: 10px;
    }
    
    .friendship-link-item {
        flex: 0 0 calc(33.333% - 0px);
        padding: 8px 8px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .friendship-link-item {
        flex: 0 0 calc(50% - 0px);
        text-align: left;
        padding-left: 0;
    }
}

/* ============================================
   友情链接组件样式 (content-friendly-links)
   使用组件前缀 content-friendly-links- 避免与其他组件冲突
   配色与 friendship-links 保持一致
   ============================================ */

/* Section */
.content-friendly-links-section {
    position: relative;
    background-color: #f1f5f9;
    padding: 40px 0 0;
    overflow: hidden;
}

.content-friendly-links-section .container {
    position: relative;
    z-index: 2;
}

/* Wrapper - 左右布局 */
.content-friendly-links-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
    padding-bottom: 15px;
}

/* Header - 左侧标题按钮 */
.content-friendly-links-header {
    flex-shrink: 0;
}

.content-friendly-links-title-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #000 0%, #666 100%);
    border-radius: 8px;
    padding: 8px;
    width: 80px;
    height: 80px;
    box-sizing: border-box;
    gap: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-friendly-links-title-text {
    display: block;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
}

.content-friendly-links-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1rem;
    line-height: 1;
}

.content-friendly-links-title-row span {
    display: inline-block;
}

/* Links Container - 右侧链接区域 */
.content-friendly-links-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.content-friendly-links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

/* Link Item - 使用行布局 */
.content-friendly-links-item {
    display: inline-block;
    padding: 8px 10px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    line-height: 1.6;
    flex: 0 0 calc(10% - 0px);
    opacity: 0;
    transform: translateY(10px);
}

.content-friendly-links-item.content-friendly-links-item-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, all 0.3s ease;
}

.content-friendly-links-item:hover {
    color: var(--primary-color);
    text-decoration: underline;
    background-color: rgba(139, 92, 246, 0.05);
}

.content-friendly-links-item span {
    display: inline;
}

/* Footer */
.content-friendly-links-footer {
    text-align: left;
    margin-top: 0;
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 1px solid #cbd5e1;
}

.content-friendly-links-note {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.6;
}

.content-friendly-links-note i {
    margin-right: 0.25rem;
    color: #64748b;
}

.content-friendly-links-note a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
}

.content-friendly-links-note a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 底部直线 */
.content-friendly-links-section::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: #cbd5e1;
    margin-top: 0;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .content-friendly-links-item {
        flex: 0 0 calc(12.5% - 0px);
    }
}

@media (max-width: 1200px) {
    .content-friendly-links-item {
        flex: 0 0 calc(16.666% - 0px);
    }
}

@media (max-width: 992px) {
    .content-friendly-links-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .content-friendly-links-title-box {
        width: 70px;
        height: 70px;
    }

    .content-friendly-links-title-text {
        font-size: 1rem;
    }

    .content-friendly-links-item {
        flex: 0 0 calc(20% - 0px);
    }
}

@media (max-width: 768px) {
    .content-friendly-links-section {
        padding: 30px 0 0;
    }

    .content-friendly-links-wrapper {
        padding-bottom: 12px;
    }

    .content-friendly-links-title-box {
        width: 70px;
        height: 70px;
    }

    .content-friendly-links-title-text {
        font-size: 1rem;
    }

    .content-friendly-links-grid {
        gap: 10px;
    }

    .content-friendly-links-item {
        flex: 0 0 calc(33.333% - 0px);
        padding: 8px 8px;
        font-size: 0.85rem;
    }

    .content-friendly-links-footer {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .content-friendly-links-item {
        flex: 0 0 calc(50% - 0px);
        text-align: left;
        padding-left: 0;
    }
}
