/*
Theme Name: Fujuchun
Description: 一个功能丰富的WordPress主题，支持logo设置、幻灯片管理和产品展示功能。
Author: Your Name
Version: 1.0
Text Domain: fujuchun
*/

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    flex-shrink: 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.site-title:hover {
    color: #3498db;
}

/* 导航菜单样式 */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    background-color: #3498db;
    color: #fff;
}

/* 主内容区域 */
.site-main {
    flex: 1;
    margin-top: 90px; /* 为固定头部留出空间 */
    margin-bottom: 0;
}

/* 幻灯片样式 */
.slideshow-container {
    position: relative;
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 400px;
}

.slide {
    display: none;
    position: relative;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 40px 20px 20px;
}

.slide-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.slide-description {
    font-size: 16px;
    opacity: 0.9;
}

/* 产品展示样式 */
.products-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #2c3e50;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover,
.product-card-link:hover .product-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-info {
    padding: 0;
    position: relative;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    text-align: center;
    padding: 7px 16px;
    background: transparent !important;
    border-radius: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.product-name:hover {
    transform: translateY(-2px);
    color: #3498db;
}

.product-link {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.product-link:hover {
    background: #2980b9;
}

/* 幻灯片导航样式 */
.slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: #fff;
    transform: scale(1.2);
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.slide-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 移动端菜单样式 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    position: relative;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 滚动时头部效果 */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
}

/* 页面加载动画 */
body.loading {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* 图片懒加载效果 */
img {
    transition: opacity 0.3s ease;
    max-width: 100%;
    height: auto;
}

img.loaded {
    opacity: 1;
}

/* 移动端优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备优化 */
    .main-navigation a,
    .product-card,
    .slide-btn,
    .dot {
        -webkit-tap-highlight-color: transparent;
    }
    
    .main-navigation a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
}

/* 防止水平滚动 */
body {
    overflow-x: hidden;
}

/* 改善文本可读性 */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* 确保点击区域足够大 */
    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* 产品卡片增强动画 */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-link {
    transition: all 0.3s ease;
}

/* 响应式设计 */

/* 平板设备 */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .slideshow-container {
        margin: 15px;
        height: 350px;
    }
    
    .slide img {
        height: 350px;
    }
}

/* 菜单切换按钮样式 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 手机设备 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        position: relative;
    }
    
    .site-branding {
        flex: 1;
    }
    
    .site-logo img {
        max-height: 45px;
    }
    
    .site-title {
        font-size: 22px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }
    
    .main-navigation.mobile-menu-open {
        max-height: 400px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
        padding: 20px 0;
        margin: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 20px;
        border-radius: 0;
        font-size: 16px;
    }
    
    .site-main {
        margin-top: 75px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .products-section {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .slideshow-container {
        margin: 15px;
        height: 250px;
        border-radius: 8px;
    }
    
    .slide img {
        height: 250px;
    }
    
    .slide-content {
        padding: 15px;
    }
    
    .slide-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .slide-description {
        font-size: 14px;
    }
    
    .slide-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .prev-btn {
        left: 8px;
    }
    
    .next-btn {
        right: 8px;
    }
    
    .slide-dots {
        bottom: 8px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
}

/* 页面内容样式 */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    flex: 1;
}

.page-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.page-header {
    padding: 20px;
    text-align: center;
}

.page-title {
    font-size: 2.5em;
    margin: 0;
    font-weight: 600;
}

.page-body {
    padding: 40px;
    line-height: 1.8;
}

.page-body h1, .page-body h2, .page-body h3, .page-body h4, .page-body h5, .page-body h6 {
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-body h1 { font-size: 2.2em; }
.page-body h2 { font-size: 1.8em; }
.page-body h3 { font-size: 1.5em; }
.page-body h4 { font-size: 1.3em; }

.page-body p {
    margin-bottom: 20px;
    color: #555;
}

.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-body ul, .page-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.page-body li {
    margin-bottom: 8px;
    color: #555;
}

.page-body blockquote {
    border-left: 4px solid #3498db;
    padding: 20px;
    margin: 30px 0;
    background: #f8f9fa;
    font-style: italic;
    color: #666;
}

.page-body a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.page-body a:hover {
    border-bottom-color: #3498db;
}

/* 产品图片样式 */
.product-image-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.product-image-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.product-image-container {
    text-align: center;
}

.product-display-image {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-display-image:hover {
    transform: scale(1.02);
}

/* 小屏手机设备 */
@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }
    
    .site-logo img {
        max-height: 40px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .site-main {
        margin-top: 70px;
    }
    
    .slideshow-container {
        margin: 10px;
        height: 200px;
    }
    
    .slide img {
        height: 200px;
    }
    
    .slide-content {
        padding: 10px;
    }
    
    .slide-title {
        font-size: 16px;
    }
    
    .slide-description {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .products-section {
        padding: 0 10px;
    }
    
    .products-grid {
        padding: 0 10px;
        gap: 15px;
    }
    
    .product-name {
        font-size: 16px;
        padding: 5px 12px;
    }
    
    .slide-btn {
        display: none; /* 在小屏幕上隐藏幻灯片按钮 */
    }
}

/* Video.js播放器样式 */
.ri-video-shortcode {
    margin: 20px 0;
    position: relative;
}

.ri-video-shortcode .video-js {
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ri-video-shortcode .vjs-16-9 {
    padding-top: 56.25%; /* 16:9 宽高比 */
}

.ri-video-shortcode .video-js .vjs-tech {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 原生HTML5视频播放器样式 */
.fujuchun-video-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fujuchun-video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    outline: none;
}

.fujuchun-video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

.fujuchun-video::-webkit-media-controls-play-button,
.fujuchun-video::-webkit-media-controls-pause-button {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.fujuchun-video::-webkit-media-controls-timeline {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.fujuchun-video::-webkit-media-controls-current-time-display,
.fujuchun-video::-webkit-media-controls-time-remaining-display {
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* 移动端视频播放器优化 */
@media (max-width: 768px) {
    .fujuchun-video-container {
        margin: 15px 0;
        border-radius: 6px;
    }
    
    .fujuchun-video {
        border-radius: 6px;
    }
    
    /* 确保视频在移动设备上正确显示 */
    .fujuchun-video::-webkit-media-controls {
        overflow: visible !important;
    }
    
    .fujuchun-video::-webkit-media-controls-panel {
        height: 44px;
    }
    
    .fujuchun-video::-webkit-media-controls-play-button,
    .fujuchun-video::-webkit-media-controls-pause-button {
        width: 32px;
        height: 32px;
    }
}

/* 全屏模式优化 */
.fujuchun-video:fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

.fujuchun-video:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

.fujuchun-video:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

/* 加载状态样式 */
.fujuchun-video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: fujuchun-video-loading 1s linear infinite;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fujuchun-video-container.loading::before {
    opacity: 1;
}

@keyframes fujuchun-video-loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 底部样式 - 无背景设计 */
.site-footer {
    background: transparent;
    color: #333333;
    padding: 50px 0 30px;
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}



.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

/* 公司信息区域 */
.footer-company-info {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.footer-company-info h4 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    letter-spacing: 1px;
}

.footer-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.footer-contact p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1.6;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-contact p:hover {
    background: transparent;
    transform: translateY(-2px);
    box-shadow: none;
}

.footer-icon {
    margin-right: 10px;
    font-size: 18px;
    color: #666666;
}

.footer-contact a {
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-contact a:hover {
    color: #2c3e50;
}

/* 版权和备案信息 */
.footer-legal {
    margin-top: 3px;
    padding: 4px;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-legal-line {
    margin: 10px 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    font-weight: 400;
    text-align: center;
}

.footer-copyright,
.footer-icp {
    display: inline;
    margin: 0;
}

.footer-icp {
    margin-left: 20px;
}

.footer-icp a {
    color: #666666;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-block;
}

.footer-icp a:hover {
    color: #2c3e50;
    background: transparent;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-footer {
        padding: 30px 0 20px;
    }
    
    .footer-company-info {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .footer-company-info h4 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .footer-contact {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-contact p {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .footer-legal {
        padding: 15px;
        margin-top: 20px;
    }
    
    .footer-copyright,
    .footer-icp {
        font-size: 13px;
        margin: 8px 0;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-company-info {
        padding: 15px;
        border-radius: 15px;
    }
    
    .footer-company-info h4 {
        font-size: 20px;
    }
    
    .footer-contact p {
        font-size: 13px;
        padding: 8px 12px;
        border-radius: 20px;
    }
    
    .footer-icon {
        font-size: 16px;
        margin-right: 8px;
    }
}