/* styles.css */
/* 全局样式 */
:root {
    --primary-color: #c62828;
    --secondary-color: #2c3e50;
    --accent-color: #e53935;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 导航栏样式 */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--primary-color);
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: none;
    padding: 10px;
    transition: transform 0.3s;
}

.menu-button:hover {
    transform: scale(1.1);
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 18px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.navbar a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: white;
    transition: width 0.3s ease;
}

.navbar a:hover:before,
.navbar a[aria-current="page"]:before {
    width: 100%;
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar a[aria-current="page"] {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* 公司部分样式 */
.company-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8a1215 100%);
    color: var(--white);
    min-height: 70vh;
    position: relative;
    overflow: hidden;
}

.company-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
    z-index: 1;
}

.company-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

.logo-container {
    position: relative;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.logo-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #e53935, transparent, #e53935);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.logo-container:hover::before {
    opacity: 1;
    animation: rotate 3s linear infinite;
}

.company-content .logo img {
    max-width: 180px;
    height: auto;
    border-radius: 12px;
    transition: var(--transition);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.logo-container:hover img {
    transform: scale(1.05);
}

.company-text {
    text-align: center;
    max-width: 500px;
}

.company-content h1 {
    font-size: 3rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--white), #e53935);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

.company-tagline {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-top: 10px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 2rem;
    animation: bounce 2s infinite;
    z-index: 2;
    cursor: pointer;
}

/* 为什么选择我们部分 */
.why-choose-ccyf {
    text-align: center;
    padding: 80px 20px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    margin: 40px 20px;
    border-radius: 8px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.why-choose-ccyf h2 {
    margin-bottom: 60px;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    position: relative;
}

.why-choose-ccyf h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--accent-color);
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
}

.feature {
    flex: 1 1 200px;
    text-align: center;
    padding: 20px;
    transition: var(--transition);
    border-radius: 8px;
}

.feature:hover {
    background-color: rgba(168, 22, 25, 0.05);
    transform: translateY(-5px);
}

.icon {
    font-size: 50px;
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: var(--transition);
}

.feature:hover .icon {
    color: var(--accent-color);
    transform: scale(1.1);
}

.feature p {
    font-size: 1.1rem;
    color: var(--light-text);
    font-weight: 500;
}

/* 优化：横向四个图片的自动滑动画廊部分 */
.gallery-section {
    padding: 80px 20px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    margin: 40px 20px;
    border-radius: 8px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    position: relative;
}

.gallery-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--accent-color);
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 400px; /* 确保容器有最小高度 */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    flex: 0 0 100%;
    min-width: 0; /* 防止flex项目溢出 */
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    aspect-ratio: 3/4;
    cursor: pointer;
    background: var(--white);
    min-width: 0; /* 防止flex项目溢出 */
    width: 100%; /* 确保宽度为100% */
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(0);
    transition: var(--transition);
}

.gallery-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.gallery-item-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

.gallery-item-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 加载状态样式 */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1.2rem;
    color: var(--light-text);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1001;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-caption {
    text-align: center;
    color: #ccc;
    padding: 10px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.modal-prev, .modal-next {
    color: white;
    font-size: 30px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-prev:hover, .modal-next:hover {
    background-color: var(--primary-color);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 20px 30px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.box {
    padding: 0 20px;
}

.box h2 {
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: white;
    position: relative;
    padding-bottom: 15px;
}

.box h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #c62828;
}

.box iframe {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.spaced-lines {
    margin-bottom: 15px;
    display: block;
}

.underline-link {
    color: #ecf0f1;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.underline-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #c62828;
    transition: width 0.3s;
}

.underline-link:hover, .underline-link.active {
    color: white;
}

.underline-link:hover:after, .underline-link.active:after {
    width: 100%;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-align: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #c62828;
    transform: translateY(-5px);
}

.social-icon i {
    font-size: 1.3rem;
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 新增图标样式 */
.contact-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.contact-icon {
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(212, 175, 55, 0.6);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .carousel-slide {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .company-content {
        flex-direction: column;
        text-align: center;
    }
    
    .company-content h1 {
        font-size: 2.5rem;
    }
    
    .carousel-slide {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 10px;
    }
    
    .menu-button {
        display: block;
        align-self: flex-start;
        margin-bottom: 10px;
    }
    
    .navbar {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .navbar.show {
        display: flex;
    }
    
    .navbar a {
        width: 100%;
        text-align: center;
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .company-section {
        padding: 80px 20px 40px;
    }
    
    .company-content h1 {
        font-size: 2rem;
    }
    
    .company-tagline {
        font-size: 1.1rem;
    }
    
    .logo-container {
        padding: 15px;
    }
    
    .company-content .logo img {
        max-width: 140px;
    }
    
    .why-choose-ccyf {
        padding: 50px 15px;
    }
    
    .why-choose-ccyf h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery-section {
        padding: 50px 15px;
    }
    
    .gallery-section h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .carousel-slide {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .box {
        padding: 0 10px;
    }
    
    .contact-icons {
        align-items: center;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .modal-nav {
        padding: 0 10px;
    }
    
    .modal-prev, .modal-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .company-section {
        padding: 60px 15px 30px;
    }
    
    .company-content h1 {
        font-size: 1.8rem;
    }
    
    .company-tagline {
        font-size: 1rem;
    }
    
    .company-content .logo img {
        max-width: 120px;
    }
    
    .why-choose-ccyf {
        padding: 40px 10px;
    }
    
    .why-choose-ccyf h2 {
        font-size: 1.8rem;
    }
    
    .feature {
        padding: 30px 20px;
    }
    
    .icon {
        font-size: 40px;
    }
    
    .feature p {
        font-size: 1rem;
    }
    
    .gallery-section {
        padding: 40px 10px;
    }
    
    .gallery-section h2 {
        font-size: 1.8rem;
    }
    
    .carousel-slide {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .gallery-item-overlay {
        padding: 15px;
    }
    
    .gallery-item-title {
        font-size: 1.1rem;
    }
}