/* 全局样式 - 绿色医疗配色方案 */
:root {
    --primary: #008f39;       /* 深绿色作为主色调 */
    --secondary: #00a843;     /* 次要绿色 */
    --accent: #ffc107;        /* 金色作为强调色 */
    --dark: #005025;          /* 深绿色 */
    --light: #f0f9f4;         /* 浅绿色背景 */
    --text-dark: #1e3a29;     /* 深色文本 */
    --text-muted: #6c8a78;    /* 次要文本颜色 */
    --border-color: #e0f0e9;  /* 边框颜色 */
    --shadow: 0 5px 20px rgba(0, 143, 57, 0.08); /* 阴影效果 */
}

body {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: #ffffff;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 143, 57, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 6px 15px rgba(0, 143, 57, 0.3);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 15px rgba(0, 143, 57, 0.3);
    transform: translateY(-2px);
}

/* 导航栏样式 */
.navbar {
    padding: 15px 0;
    background-color: white !important;
    box-shadow: var(--shadow);
}

.navbar-brand img {
    max-height: 40px;
}

/* Logo 图片样式 */
.logo-img {
    width: 180px;
    height: auto;
    object-fit: contain;
}

.nav-link {
    font-weight: 500;
    padding: 10px 15px !important;
    color: var(--text-dark) !important;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
}

/* MedLink Logo 样式 */
.logo-container {
    width: 40px;
    height: 40px;
    position: relative;
    background-color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 143, 57, 0.2);
}

.logo-cross {
    position: absolute;
    width: 20px;
    height: 4px;
    background-color: white;
    border-radius: 2px;
}

.logo-cross:after {
    content: '';
    position: absolute;
    width: 4px;
    height: 20px;
    background-color: white;
    left: 8px;
    top: -8px;
    border-radius: 2px;
}

.logo-link {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 3px solid white;
    border-radius: 50%;
    bottom: 4px;
    right: 4px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.logo-container-footer {
    width: 30px;
    height: 30px;
    position: relative;
    background-color: #0d6efd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 页脚logo样式 */
.logo-img-footer {
    width: 150px;
    height: auto;
    object-fit: contain;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 600;
    line-height: 1.3;
}

.section-title span {
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.section-title h2 {
    margin-top: 8px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 15px;
}

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

/* 语言切换样式 */
.lang-btn {
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.lang-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 143, 57, 0.2);
}

.lang-btn:hover:not(.active) {
    background-color: rgba(0, 143, 57, 0.1);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
    background-color: #ffffff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 80, 37, 0.1);
}

.card-title {
    color: var(--dark);
    font-weight: 600;
}

.card-body {
    padding: 30px;
}

/* 背景色 */
.bg-light {
    background-color: var(--light) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* 圆形图标容器 */
.rounded-circle.bg-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px !important;
    height: 50px !important;
}

.rounded-circle.bg-primary i {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* 可能需要调整图标大小以适应较小的容器 */
.rounded-circle.bg-primary i.fs-3 {
    font-size: 1.5rem !important;
}

/* 强调色应用 */
.text-accent {
    color: var(--accent) !important;
}

.bg-accent {
    background-color: var(--accent) !important;
}

/* 轮播图样式 */
.carousel-item {
    height: 550px;
    overflow: hidden;
    position: relative;
}

.carousel-item:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 80, 37, 0.1), rgba(0, 80, 37, 0.5));
}

.carousel-item img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: none;
}

/* 确保图片加载失败时有占位符 */
.carousel-item img:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f9f4;
}

.carousel-caption {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 12px;
    bottom: 70px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.carousel-caption h2 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.carousel-caption p {
    color: var(--text-dark);
}

/* 页脚样式 */
footer {
    background-color: var(--dark) !important;
    padding-top: 60px;
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

footer h5:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
}

footer a:hover {
    color: var(--accent) !important;
}

footer .list-unstyled li {
    margin-bottom: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption {
        bottom: 30px;
        padding: 20px;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
}

/* 表单样式 */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s;
    background-color: #f9fff9;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 143, 57, 0.15);
    background-color: #ffffff;
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* 服务版块特殊样式 */
#services .card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

#services .card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

#services .card:hover:before {
    opacity: 1;
}

#services .rounded-circle {
    transition: all 0.3s ease;
    width: 80px;
    height: 80px;
}

#services .card:hover .rounded-circle {
    background-color: var(--accent) !important;
    transform: scale(1.1);
}

/* 预约表单卡片特殊样式 */
#appointment .card {
    border-radius: 12px;
    overflow: hidden;
}

#appointment .card-body {
    padding: 35px;
}

/* 联系我们卡片样式 */
#contact .card {
    border-radius: 12px;
    overflow: hidden;
}

#contact .rounded-circle {
    width: 70px;
    height: 70px;
}

/* 医院环境图片样式 */
.img-fluid.rounded {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.img-fluid.rounded:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 80, 37, 0.15);
}

/* 特殊强调 */
.bi-check-circle-fill {
    color: var(--primary);
} 

/* 修复其他图片问题 */
.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 专科卡片样式 */
.specialty-card {
    transition: all 0.3s ease;
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 143, 57, 0.15) !important;
}

.specialty-card:hover .rounded-circle {
    background-color: var(--accent) !important;
}

.specialty-card .card-body {
    padding: 1.25rem !important;
}

.specialty-card .card-title {
    font-size: 1rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .specialty-card .card-title {
        font-size: 1.1rem;
    }
}

/* 修复导航栏问题 */
.navbar-collapse.show {
    display: block !important;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        padding: 1rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .navbar-nav.lang-nav {
        border-top: 1px solid rgba(0,0,0,0.1);
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
}