/*
Theme Name: 莞牙网主题
Theme URI: https://example.com/
Author: 你的名字
Author URI: https://example.com/
Description: 一个为东莞牙科引流平台定制的WordPress主题。
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-background, one-column, accessibility-ready
Text Domain: guanyawang
*/

/* --- 全局样式和重置 --- */
:root {
    --primary-color: #007BFF; /* 主题蓝色 */
    --secondary-color: #49c5b6; /* 辅助绿色/青色 */
    --dark-color: #333;
    --light-color: #f4f4f4;
    --white-color: #fff;
    --grey-text: #666;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--dark-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    color: var(--dark-color);
    text-align: center;
}

h2 {
    margin-top: 40px;
    margin-bottom: 30px;
    font-size: 2em;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

/* --- 头部导航 --- */
header {
    background-color: var(--white-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}
header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
header nav ul li {
    margin-left: 25px;
}
header nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
}
header nav ul li a:hover {
    color: var(--primary-color);
}
.partner-join a {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
}

/* --- 英雄区/首屏 --- */
.hero {
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    text-align: center;
    padding: 100px 20px;
}
.hero h1 {
    color: var(--white-color);
    font-size: 3em;
    margin-bottom: 10px;
}
.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}
.search-bar {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}
.search-bar input[type="search"] {
    flex-grow: 1;
    padding: 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1em;
}
.search-bar input[type="submit"] {
    padding: 15px 25px;
    border: none;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 1em;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}

/* --- 核心服务项目 --- */
.services { background-color: var(--white-color); padding: 40px 0; }
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    text-align: center;
}
.service-item {
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-radius: 8px;
}
.service-item .icon {
    font-size: 3em;
    color: var(--primary-color);
}
.service-item h3 {
    margin-top: 10px;
    font-size: 1.1em;
}

/* --- 推荐门诊 --- */
.clinic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.clinic-card {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.clinic-card:hover {
    transform: translateY(-5px);
}
.clinic-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.clinic-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.clinic-card h3 {
    margin-top: 0;
    text-align: left;
}
.clinic-card p {
    color: var(--grey-text);
    font-size: 0.9em;
    margin-bottom: 15px;
    flex-grow: 1;
}
.clinic-tags {
    margin-bottom: 15px;
}
.clinic-tags .tag {
    display: inline-block;
    background-color: #e7f3ff;
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}
.clinic-card .btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto;
}

/* --- 口腔科普知识 --- */
.knowledge { background-color: var(--white-color); padding: 40px 0 60px 0; }
.article-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.article-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}
.article-item:hover {
    background-color: #fafafa;
}
.article-item a {
    text-decoration: none;
    color: var(--dark-color);
}
.article-item .entry-title {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    text-align: left;
}
.article-item .entry-excerpt {
    margin: 0;
    color: var(--grey-text);
    font-size: 0.9em;
}

/* --- 悬浮咨询按钮 --- */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
    cursor: pointer;
    z-index: 999;
    text-decoration: none;
}

/* --- 底部 --- */
footer {
    background-color: var(--dark-color);
    color: #ccc;
    text-align: center;
    padding: 30px 20px;
}
footer .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}
footer .footer-links ul li {
    display: inline-block;
    margin: 0 8px;
}
footer .footer-links ul li a {
    color: #ccc;
    text-decoration: none;
}
footer .footer-links ul li a:hover {
    color: var(--white-color);
}


/* --- 响应式设计 --- */
@media (max-width: 768px) {
    .header-container { flex-direction: column; }
    header nav ul { margin-top: 15px; }
    .hero h1 { font-size: 2.2em; }
    .clinic-grid, .article-list { grid-template-columns: 1fr; }
}




/* --- 头部导航栏最终布局样式 (V4 Final & Simplest) --- */

/* 核心布局：左右两端对齐 */
.header-container {
    display: flex;
    justify-content: space-between; /* 左右两端对齐 */
    align-items: center; /* 垂直居中 */

}

/* 左侧容器：Logo和导航 */
.header-left {
    display: flex;
    align-items: center;
    gap: 30px; /* Logo和导航之间的间距 */
}

/* 右侧容器：搜索和按钮 */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px; /* 搜索图标和加盟按钮之间的间距 */
}


/* --- 搜索框的具体样式 (基本不变，微调位置) --- */
.header-search {
    position: relative;
}

.search-icon {
    font-size: 1.5em;
    cursor: pointer;
    user-select: none;
}

.search-form {
    display: none;
    position: absolute;
    top: 140%; /* 调整弹出位置 */
    right: -100px; /* 调整弹出位置，让它更居中 */
    background-color: var(--white-color);
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    z-index: 1001;
    width: 280px;
    display: flex;
}

.search-form.active {
    display: flex;
}

.search-form .search-field {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
    font-size: 14px;
}

.search-form .search-submit {
    padding: 10px 15px;
    border: none;
    background-color: var(--primary-color);
    color: var(--white-color);
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    font-weight: bold;
}

.partner-join {
    white-space: nowrap; /* 防止按钮文字换行 */
}







/* --- 单篇文章页面 (single.php) 样式 --- */

.single-post-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 40px; /* 主内容和侧边栏的间距 */
}

.main-content {
    flex: 1; /* 占据更多空间 */
    min-width: 0; /* 防止内容过长撑破布局 */
}

.sidebar {
    width: 300px; /* 侧边栏固定宽度 */
    flex-shrink: 0;
}

.post-entry {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.entry-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.entry-title {
    font-size: 2.2em;
    text-align: left;
    margin: 0;
}

.entry-meta {
    margin-top: 15px;
    color: #888;
    font-size: 0.9em;
}

.entry-meta span {
    margin-right: 20px;
}

.post-thumbnail {
    margin-bottom: 30px;
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.entry-content {
    line-height: 1.8;
    font-size: 16px;
}

/* 文章内容里的表格样式，适配我们写的价格表 */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.entry-content th, .entry-content td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
.entry-content th {
    background-color: #f7f7f7;
    font-weight: bold;
}

/* 侧边栏小工具样式 */
.widget {
    margin-bottom: 40px;
}
.widget-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    text-align: left;
}
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    margin-bottom: 10px;
}
.widget ul li a {
    text-decoration: none;
    color: var(--dark-color);
}
.widget ul li a:hover {
    color: var(--primary-color);
}

/* 手机端响应式 */
@media (max-width: 992px) {
    .single-post-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        margin-top: 40px;
    }
}