/* 全局样式 */
html {
    font-size: 16px; /* 设置根元素字体大小 */
}

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

:root {
    --logo-dark: #28343d;
    --logo-blue: #2b3250;
    --logo-green: #00997f;
    --background-light: #f5f7fa;
    --text-dark: #1a2a3a;
    --text-light: #ffffff;
    --accent-color: #ff6b6b;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.container {
    width: 90%;
    max-width: 85%; /* 1200px */
    margin: 0 auto;
    overflow: hidden;
}

/* 头部样式 */
header {
    background: var(--background-light);
    color: var(--logo-dark);
    padding: 1rem 0;
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-branding {
    display: flex;
    align-items: center;
}

/* logo 样式 */
.logo {
    background-color: var(--background-light);
    padding: 0.625rem;
    border-radius: 0.3125rem;
    margin-right: 1.25rem;
}

.logo img {
    width: 6.5rem; /* 80px */
    height: auto;
}

header #branding h1 {
    margin: 0;
    color: var(--logo-dark);
    font-size: 2.5rem;
}

header nav ul {
    display: flex;
    padding: 0;
    list-style: none;
}

header nav li {
    padding: 0 1.25rem;
}

header a {
    color: var(--logo-blue);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1rem;
}

header .highlight, header .current a {
    color: var(--logo-green);
    font-weight: bold;
}

header a:hover {
    color: var(--accent-color);
    font-weight: bold;
}

/* 响应式设计 */
@media(max-width: 48rem) { /* 768px */
    html {
        font-size: 14px; /* 在小屏幕上减小根字体大小 */
    }

    header .container {
        flex-direction: column;
        align-items: stretch;
    }

    .logo-branding {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 1rem;
    }

    .logo {
        margin-right: 0.625rem;
    }

    .logo img {
        width: 4.285rem; /* 60px when root font size is 14px */
    }

    header #branding h1 {
        font-size: 1.5rem;
    }

    header nav {
        width: 100%;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    header nav li {
        padding: 0.5rem 1rem;
    }
}

/* 更小屏幕的额外调整 */
@media(max-width: 30rem) { /* 480px */
    html {
        font-size: 12px;
    }

    .logo-branding {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    header #branding h1 {
        font-size: 1.5rem;
    }
}

/* 展示区域样式 */
#showcase {
    min-height: 25rem; /* 400px */
    background: linear-gradient(rgba(43, 50, 80, 0.8), rgba(43, 50, 80, 0.8)), url('../img/showcase.png') no-repeat center center;
    background-size: cover;
    text-align: center;
    color: var(--text-light);
    position: relative;
    z-index: 5; /* 确保 showcase 在最底层 */
}

#showcase h1 {
    margin-top: 6.25rem; /* 100px */
    font-size: 3.4375rem; /* 55px */
    margin-bottom: 0.625rem; /* 10px */
}

#showcase p {
    font-size: 1.25rem; /* 20px */
}

/* 搜索区域样式 */
#search {
    color: var(--text-light);
    background: var(--logo-blue);
    height: 4rem;
}

#search h1 {
    margin-top: 1rem;
    float: left;
}

#search form {
    margin-top: 1rem;
    float: right;
}

#search input[type="text"] {
    padding: 0.25rem; /* 4px */
    height: 1.5625rem; /* 25px */
    width: 15.625rem; /* 250px */
    border: 0.0625rem solid var(--background-light);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
}

/* 产品轮播图样式 */
#product-carousel {
    margin: 1.25rem 0;
}

.product-carousel {
    background-color: var(--background-light);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 450px; /* 根据需要调整高度 */
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-indicators {
    position: absolute;
    bottom: 0rem; /* 调整到适当的底部距离 */
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    height: auto; /* 减小高度 */
    background-color: transparent; /* 移除背景色 */
}

.indicator {
    width: 30px; /* 增加宽度 */
    height: 4px; /* 减小高度，改为条状 */
    background-color: rgba(0, 153, 127, 0.3); /* 使用 logo-green 颜色，但带透明度 */
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: rgba(0, 153, 127, 0.8); /* 更不透明的 logo-green */
}

/* 调整产品图片和信息的样式 */
.product-image {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    width: 50%;
    padding: 20px;
    overflow-y: auto;
    max-height: 100%;
    margin-left: 4rem;
}

.product-info h2 {
    margin-bottom: 15px;
    color: var(--logo-green);
}

.product-info div {
    color: var(--text-dark);
}

/* 公司信息样式 */
#company-info {
    padding: 1.25rem 0;
    background: var(--logo-dark);
    color: var(--text-light);
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    margin: 0;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-content p:first-child {
        margin-bottom: 10px;
    }
}

/* 按钮样式 */
.button {
    background-color: var(--logo-green);
    color: var(--text-light);
    padding: 0.625rem 0.9375rem;
    border: none;
    border-radius: 0.3125rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.button:hover {
    background-color: var(--accent-color);
}

/* 链接样式 */
a {
    color: var(--logo-green);
    text-decoration: none;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* 确保 language-select 可见 */
#language-select {
    display: inline-block;
    margin-left: 0.625rem;
    padding: 0.3125rem;
    border: 0.0625rem solid var(--logo-dark);
    border-radius: 0.25rem;
    background-color: var(--background-light);
    color: var(--text-dark);
}

/* 如果在移动设备上有问题，可以添加以下媒体查询 */
@media (max-width: 48rem) { /* 768px */
    header {
        padding-right: 0.625rem; /* 在小屏幕上减小右内边距 */
    }

    header nav {
        margin-right: -0.625rem; /* 调整负边距以匹配 */
    }

    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    nav ul li {
        margin: 0.3125rem;
        padding: 0 0.625rem; /* 在小屏幕上进一步减小内边距 */
    }
    #language-select {
        width: 100%;
        margin: 0.625rem 0;
    }
}

#product-header {
    background-color: var(--background-light);
    padding: 1.25rem 0;
    border-bottom: 0.0625rem solid var(--logo-dark);
}

#product-header .container {
    max-width: 75rem; /* 1200px */
    margin: 0 auto;
    padding: 0 1.25rem;
}

#product-header h1 {
    color: var(--logo-dark);
    margin-bottom: 0.625rem;
}

.product-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-header-content p {
    margin: 0;
    flex-grow: 1;
}

#language-select {
    margin-left: 1.25rem;
    padding: 0.3125rem;
    border: 0.0625rem solid var(--logo-dark);
    border-radius: 0.25rem;
    background-color: var(--background-light);
    color: var(--text-dark);
}

@media (max-width: 48rem) { /* 768px */
    .product-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    #language-select {
        margin-left: 0;
        margin-top: 0.625rem;
        align-self: flex-end;
    }
}



.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.indicator {
    width: 30px;
    height: 4px;
    background-color: rgba(0, 153, 127, 0.3); /* 半透明的 logo-green */
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: rgba(0, 153, 127, 0.8); /* 更不透明的 logo-green */
}


#contact-info {
    background-color: #f4f4f4;
    padding: 2rem 0;
}

#contact-info h3 {
    color: var(--logo-green);
    margin-bottom: 1rem;
}

#contact-info h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

#contact-info p {
    margin-bottom: 0.5rem;
}

#contact-info .email a {
    color: var(--logo-green);
    text-decoration: none;
}

#contact-info .email a:hover {
    text-decoration: underline;
}

/* 关于我们页面样式 */
.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.about-text {
    flex: 1;
    padding-right: 2rem;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 2rem;
    }
}
