/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Helvetica', sans-serif; /* 更改字体 */
    line-height: 1.6;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    background-color: #37B5FE;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #37B5FE;
}

/* 导航栏样式 */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo img {
    height: 50px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

nav ul li a:hover {
    color: #37B5FE;
}

/* 当前页面菜单项的下划线高亮效果 */
nav ul li a.active {
    color: #37B5FE;
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #37B5FE;
}

/* 下拉箭头样式 */
.dropbtn .fa-chevron-down {
    font-size: 12px;
    margin-left: 5px;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    position: relative;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #37B5FE;
}

.dropdown-content a.active {
    color: #37B5FE;
}

.dropdown-content a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    width: calc(100% - 32px);
    height: 2px;
    background-color: #37B5FE;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropbtn {
    cursor: pointer;
}

.language-switch {
    margin-left: 20px;
}

.language-switch button {
    background-color: #37B5FE;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.language-switch button:hover {
    background-color: #37B5FE;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 主横幅样式 */
.hero {
    /* background-image: url('images/HappyLife.jpg'); 
    color: #333; /* 更改文字颜色为深色，以便在新背景上更清晰 */
    background-color: #37B5FE; /* 背景颜色 */  
    background-size: cover;
    background-position: center;
    color: white; /* 文字颜色 */
    text-align: center;

    padding: 100px 0 70px; /* 减小内边距，降低高度 */
    margin-top: 0; /* 移除顶部边距，解决header移除后的显示问题 */
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 24px;
    margin-bottom: 30px;
}

/* 服务介绍样式 */
.services {
    padding: 80px 0;
    text-align: center;
    background-color: #f9f9f9;
}

.services h2 {
    margin-bottom: 50px;
    font-size: 36px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card i {
    font-size: 48px;
}

.service-image {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.service-image img {
    max-width: 80px;
    height: auto;
}

/* 医疗设备页面图片尺寸调整 */
.main-services .service-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 24px;
}

.reason-item p {
    color: #666;
    line-height: 1.6;
    display: none;
}

/* 添加脚本以在页面加载时添加index-page类 */
script {
    display: none;
}

/* 关于我们样式 */
.about {
    padding: 80px 0;
}

.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 20px;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 联系我们样式 */
.contact {
    padding: 80px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.contact h2 {
    margin-bottom: 50px;
    font-size: 36px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 30px;
    position: relative;
}

.contact-info, .contact-form {
    position: relative;
    z-index: 1;
}

.contact-info-column {
    position: relative;
    z-index: 1;
    padding-right: 20px;
}

/* 页面头部样式 */
.page-header {
    background-color: #f5f5f5;
    padding: 100px 0 20px; /* 调整内边距，增加顶部空间，减少底部空间 */
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0; /* 移除顶部边距，解决header移除后的显示问题 */
    min-height: 150px; /* 确保最小高度 */
    display: block; /* 确保所有页面都显示page-header */
}

/* 首页特殊处理 */
body.index-page .page-header {
    padding: 120px 0 30px; /* 首页可以有更大的padding */
}

/* 联系页面样式 */
.contact-section {
    padding: 60px 0;
    position: relative;
}

.contact-section h2 {
    margin-bottom: 30px;
}

.contact-info {
    text-align: left;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.info-item i {
    font-size: 24px;
    color: #37B5FE;
    margin-right: 15px;
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.contact-form textarea {
    height: 150px;
    resize: none;
}

.contact-form .btn {
    margin-top: 10px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 地图部分样式 */
.map-section {
    padding: 30px 0;
    background-color: transparent;
    width: 100%;
    margin-top: 30px;
}

.map-section h2 {
    text-align: left;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.map-container {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    display: block;
    height: 100%;
}

/* 页脚样式 */
footer {
    background-color: hwb(0 100% 0%);
    color: rgb(0, 0, 0);
    padding: 50px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 50px;
}

.footer-links h3,
.footer-social h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #000000;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #37B5FE;
}

.social-icons {
    display: flex;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #444;
    border-radius: 50%;
    margin-right: 10px;
    color: white;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: #37B5FE;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* 确保导航在桌面视图下显示 */
nav {
    display: flex;
}

/* 响应式设计 */
/* 平板设备 */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reasons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .hero-content p {
        font-size: 20px;
    }
}

/* 手机设备 */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 10px;
    }
    
    header .container {
        padding: 10px;
    }
    
    .logo img {
        height: 40px;
    }
    
    nav {
        display: none; /* 只在移动设备视图下隐藏导航菜单 */
    }

    nav.active {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 15px;
        z-index: 999;
    }

    nav.active ul {
        flex-direction: column;
    }

    nav.active ul li {
        margin: 10px 0;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        min-width: 100%;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .language-switch {
        margin-right: 15px;
    }
    
    .language-switch button {
        padding: 6px 12px;
        font-size: 14px;
    }

    .hero {
        padding: 80px 0 50px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .services, .about, .contact {
        padding: 50px 0;
    }
    
    .services h2, .about-content h2, .contact h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .services-grid, .reasons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 20px;
    }

    .about .container,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        order: -1;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 12px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* 小型手机设备 */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .service-card h3 {
        font-size: 20px;
    }
    
    .page-header {
        padding: 80px 0 15px;
        min-height: 120px;
    }
    
    .map-container {
        height: 250px;
    }
}