/*
 * Main CSS File for Bulma jQuery Website
 * Author: Your Name
 * Version: 1.0
 */

/* ===== Global Styles ===== */
:root {
    --primary-color: #0099ff;
    --secondary-color: #007acc;
    --success-color: #23d160;
    --warning-color: #ffdd57;
    --danger-color: #ff3860;
    --light-color: #f5f5f5;
    --dark-color: #363636;
    --text-color: #4a4a4a;
    --border-radius: 4px;
    --box-shadow: 0 2px 15px rgba(10, 10, 10, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* ===== Utility Classes ===== */
.has-shadow {
    box-shadow: var(--box-shadow);
}

.has-radius {
    border-radius: var(--border-radius);
}

.is-clickable {
    cursor: pointer;
}

/* Navigation styles moved to navbar.css */

/* ===== Full-screen Video Carousel ===== */
.fullscreen-carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - 70px); /* 视口高度减去导航栏高度 */
    overflow: hidden;
}

/* 考虑 WordPress Admin Bar */
body.admin-bar .fullscreen-carousel {
    height: calc(100vh - 70px - 32px); /* 再减去 Admin Bar 的高度 */
}

/* Carousel Slides */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    visibility: hidden; /* 使用visibility而不是display，以保持过渡效果 */
    pointer-events: none; /* 禁用非活动幻灯片的鼠标事件 */
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
    visibility: visible; /* 显示当前活动幻灯片 */
    pointer-events: auto; /* 启用活动幻灯片的鼠标事件 */
}

/* Video Background */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-background:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay for better text readability */
    z-index: -1; /* Change z-index to -1 to place it behind the parent */
}

/* Ensure image backgrounds cover the area */
.video-background.image-background {
    background-size: cover;
    background-position: center;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 0;
}

/* 后备图片样式 */
.video-background img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none; /* 默认隐藏，只在视频无法播放时显示 */
    z-index: 0;
}

/* Slide Content */
.slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    text-align: left;
    padding: 0 2rem;
}

.slide-content .title,
.slide-content .subtitle {
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content .title {
    font-size: 3.5rem;
    font-weight: 700;
}

.slide-content .subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.slide-content .buttons {
    margin-top: 2rem;
    justify-content: left;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* 提高z-index确保导航在最上层 */
}

.carousel-dots {
    display: flex;
    margin: 0 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* 添加相对定位 */
    z-index: 11; /* 确保点击区域在最上层 */
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* 增加点击区域 */
.dot:after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: 12;
}

.prev-slide,
.next-slide {
    background: rgba(0, 0, 0, 0.5); /* 增加背景不透明度 */
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* 添加相对定位 */
    z-index: 11; /* 确保按钮在最上层 */
    outline: none; /* 移除点击时的轮廓 */
}

.prev-slide:hover,
.next-slide:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1); /* 悬停时稍微放大 */
}

/* 增加按钮的点击区域 */
.prev-slide:after,
.next-slide:after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: 12;
}

/* Responsive styles for carousel */
@media screen and (max-width: 768px) {
    .slide-content .title {
        font-size: 2.5rem;
    }

    .slide-content .subtitle {
        font-size: 1.2rem;
    }

    .slide-content .button {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* Hero Section (keeping for other pages) */
.hero.is-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* ===== Recommended Products Section ===== */
#recommended-products {
    background-color: #f9f9f9;
    padding: 5rem 1.5rem;
    background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.9), rgba(245, 245, 245, 0.9));
    position: relative;
    overflow: hidden;
}

#recommended-products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/pattern-bg.png');
    background-size: cover;
    opacity: 0.05;
    z-index: 0;
}

.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

/* Product Info (Left Side) */
.product-info {
    padding-right: 1rem;
    position: relative;
}

.product-description {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-description.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

.product-description h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 0.75rem;
}

.product-description h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.product-description p {
    line-height: 1.7;
    color: #555;
}

.product-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Product Images (Middle) */
.product-images {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container {
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    background-color: white;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-image.active {
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

.product-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Product List (Right Side) */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-right: 1px solid #aaa;
}

.product-list-item {
    padding: 0.5rem 1rem;
    /* border-radius: 4px; */
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: right;
}

.product-list-item.active {
    /* background-color: rgba(255, 255, 255, 0.8);
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
    color: #0099ff;
}

.product-list-item i {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.product-list-item.active i,
.product-list-item:hover i {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive adjustments */
@media screen and (max-width: 1023px) {
    .product-showcase {
        grid-template-columns: 1fr 1fr;
    }

    .product-list {
        grid-column: span 2;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .product-list-item {
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .product-list-item.active {
        border-left: none;
        border-bottom: 3px solid var(--primary-color);
    }
}

@media screen and (max-width: 768px) {
    .product-showcase {
        grid-template-columns: 1fr;
    }

    .product-info {
        padding-right: 0;
    }

    .product-list {
        grid-column: span 1;
        grid-template-columns: 1fr 1fr;
    }

    .product-image-container {
        height: 300px;
    }
}

/* ===== Features Section ===== */
.box {
    transition: var(--transition);
    height: 100%;
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(10, 10, 10, 0.1);
}

.icon.is-large {
    height: 3rem;
    width: 3rem;
}

/* ===== Services Tabs ===== */
.tabs.is-boxed li.is-active a {
    background-color: white;
    border-color: #dbdbdb;
    border-bottom-color: transparent !important;
}

.tab-content .tab-pane {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--box-shadow);
}

.tab-content .tab-pane.is-active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Testimonials ===== */
.testimonial-slider {
    position: relative;
    overflow: hidden;
}

.testimonial-slide {
    display: none;
    animation: fadeIn 0.5s ease;
}

.testimonial-slide:first-child {
    display: block;
}

.testimonial-prev,
.testimonial-next {
    margin: 0 0.5rem;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--light-color);
    padding: 3rem 1.5rem 3rem;
    display: flex;
    justify-content: space-evenly;
}

.footer ul {
    list-style: none;
    padding: 0.75rem 0;
}

.footer ul li {
    margin-bottom: 0.25rem;
    flex: 1;
}

.footer-title {
    margin-bottom: 0.5rem;
}

.footer ul li a {
    color: var(--text-color);
    transition: var(--transition);
}

.footer ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons .icon {
    color: var(--text-color);
    transition: var(--transition);
}

.social-icons .icon:hover {
    color: var(--primary-color);
}

/* ===== About Page ===== */
.client-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.client-logo:hover {
    transform: scale(1.05);
}

.client-logo img {
    max-height: 60px;
    width: auto;
}

/* ===== Contact Page ===== */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-container {
    margin-top: 2rem;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.faq-question h4 {
    margin: 0;
}

.faq-answer {
    padding: 0 1rem 1rem;
    display: none;
}

.faq-answer.is-active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* ===== Company Profile Section ===== */
#company-profile {
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.95), rgba(245, 245, 245, 0.95));
}

#company-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/pattern-bg.png');
    background-size: cover;
    opacity: 0.05;
    z-index: 0;
}

.company-profile-header {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.company-profile-content {
    position: relative;
    z-index: 1;
}

.company-description {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: left;
    line-height: 1.8;
}

.company-description p {
    margin-bottom: 1rem;
    color: #555;
}

.company-stats {
    margin-top: 2rem;
}

.stat-box {
    background-color: white;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    display: inline-block;
}

.stat-plus, .stat-percent {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    display: inline-block;
    margin-left: 5px;
}

.stat-label {
    margin-top: 0.5rem;
    color: #666;
    font-size: 1rem;
}

@media screen and (max-width: 768px) {
    .stat-box {
        margin-bottom: 1rem;
    }
}

/* ===== News Section ===== */
#news {
    background-color: #fff;
    position: relative;
}

.news-header {
    margin-bottom: 2rem;
}

/* News Carousel */
.news-carousel {
    position: relative;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.news-carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.news-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
}

.news-slide.active {
    opacity: 1;
    z-index: 2;
}

.news-image-container {
    flex: 1;
    overflow: hidden;
}

.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-carousel:hover .news-image-container img {
    transform: scale(1.05);
}

.news-slide-title {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    color: white;
}

.news-slide-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-slide-title h3 a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: .75rem;
}


/* News Carousel Navigation */
.news-carousel-nav {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    padding: 0.5rem;
}

.news-dots {
    display: flex;
    margin: 0 10px;
}

.news-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-dot.active {
    background: white;
    transform: scale(1.2);
}

.news-prev,
.news-next {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-prev:hover,
.news-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
}

.news-list-header {
    margin-bottom: 1.5rem;
    position: relative;
}

.news-list-header h3 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.news-list-header h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.news-list-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-item {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    margin-right: 1rem;
    text-align: center;
    border-right: 1px solid #eee;
    padding-right: 1rem;
}

.news-day {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.news-month {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.3rem;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.4;
}

.news-title a {
    color: #333;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (max-width: 768px) {
    .news-carousel-container {
        height: 300px;
    }

    .news-item {
        flex-direction: column;
    }

    .news-date {
        flex-direction: row;
        justify-content: flex-start;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .news-day {
        margin-right: 0.5rem;
    }
}

/* ===== Contact Form Section ===== */
#contact-form {
    background-color: #f5f9fd;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(to bottom right, rgba(245, 249, 253, 0.95), rgba(235, 245, 253, 0.95));
}

#contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/pattern-bg.png');
    background-size: cover;
    opacity: 0.05;
    z-index: 0;
}

.contact-header {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.contact-form-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form-slogan {
    color: #333;
}

.contact-form {
    background-color: transparent;
    padding: 2rem 0;
}

.contact-form .input {
    background-color: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    height: 3rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form .input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.2);
}

.contact-form .input.is-info {
    border-color: #e0e0e0;
}

.contact-form .input.is-info:focus {
    border-color: var(--primary-color);
}

.contact-form .control.has-icons-left .icon {
    color: #aaa;
}

.contact-form .submit-button {
    padding: 0.75rem 3rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    border-color: transparent;
}

.contact-form .submit-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
    .contact-form {
        padding: 1.5rem 0;
    }

    .contact-form .input {
        height: 2.5rem;
    }

    .contact-form .submit-button {
        width: 100%;
    }
}

/* ===== Responsive Styles ===== */
@media screen and (max-width: 1023px) {
    .hero-body {
        padding: 3rem 1.5rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .hero-body {
        padding: 2rem 1rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .columns.is-vcentered {
        display: flex;
        flex-direction: column;
    }

    .column.is-6 {
        width: 100%;
    }

    .tabs.is-boxed li {
        width: 100%;
    }

    .tabs.is-boxed li a {
        text-align: center;
    }
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .button.is-primary {
    background-color: var(--primary-color) !important;
    border-color: transparent !important;
    color: white !important;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
  }
  
  .button.is-primary.is-hovered,
  .button.is-primary.is-focused,
  .button.is-primary.is-active,
  .button.is-primary:focus,
  .button.is-primary:hover {
    background-color: var(--secondary-color) !important;
  }
  
  .button.is-hovered, .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .footer-logo {
    max-width: 220px;
    height: auto;
  }

  .navbar-site-logo {
    height: 60px;
    width: auto;
  }