/* ============================================================
   HY Bio — 慧赢生物 企业网站样式
   ============================================================ */

:root {
    --primary: #1a6fb5;
    --primary-dark: #0f4a7a;
    --primary-light: #e8f4fd;
    --primary-gradient: linear-gradient(135deg, #0f4a7a 0%, #1a6fb5 50%, #2d8fd4 100%);
    --accent: #17a2b8;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8faff;
    --border-color: #e8ecf0;
    --shadow: 0 2px 15px rgba(26, 111, 181, 0.08);
    --shadow-hover: 0 8px 30px rgba(26, 111, 181, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    padding-top: 76px;
    background: #fff;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0,0,0,0.06);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-dark) !important;
}

.navbar-brand img {
    margin-right: 8px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.7rem 1rem !important;
    transition: color 0.2s;
}

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

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero-section {
    background: var(--primary-gradient);
    color: #fff;
    padding: 140px 0 110px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 800px;
    height: 800px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 3.2rem;
    margin-bottom: 0.3rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 650px;
    margin-top: 0.8rem;
}

.hero-section .tagline-en {
    font-size: 1rem;
    opacity: 0.75;
    letter-spacing: 1px;
    font-weight: 300;
    margin-top: 0.3rem;
}

.hero-english-name {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 3px;
    opacity: 0.7;
    margin-top: 0.2rem;
}

.hero-english-subtitle {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    opacity: 0.55;
}

/* ============================================================
   Section Titles
   ============================================================ */
.section-title {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* ============================================================
   Service Cards
   ============================================================ */
.service-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    background: #fff;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.service-card .icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary);
    transition: all 0.3s;
}

.service-card:hover .icon-wrap {
    background: var(--primary);
    color: #fff;
}

.service-card h5 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--primary-dark);
}

.service-card .card-text {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.service-card .badge {
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}

/* ============================================================
   Subservice Chips
   ============================================================ */
.subservice-chip {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin: 0.2rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.subservice-chip:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

/* ============================================================
   Content HTML (rendered markdown)
   ============================================================ */
.content-html h2 {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.content-html h3 {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    scroll-margin-top: 90px;
}

.content-html h4 {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    margin-top: 1.2rem;
}

.content-html p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #444;
}

.content-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.content-html table th {
    background: var(--primary-dark);
    color: #fff;
    font-weight: 600;
    padding: 0.7rem 1rem;
    border: 1px solid var(--primary-dark);
}

.content-html table td {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
}

.content-html table tr:nth-child(even) {
    background: var(--bg-light);
}

.content-html ul, .content-html ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-html blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: var(--bg-light);
    border-radius: 0 8px 8px 0;
    color: #555;
    font-style: italic;
}

.content-html hr {
    margin: 1.5rem 0;
    border-color: var(--border-color);
}

/* ============================================================
   About Page
   ============================================================ */
.about-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
}

.mission-box {
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
}

.mission-box h3 {
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: #0f1e36;
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}

footer h5 {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #fff;
}

footer .contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
}

footer .contact-item i {
    margin-top: 3px;
    margin-right: 8px;
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1rem;
    margin-top: 2rem;
    font-size: 0.82rem;
}

/* ============================================================
   Contact Page
   ============================================================ */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-info-item .icon-box {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* ============================================================
   Service Detail Page
   ============================================================ */
.service-header {
    background: var(--primary-gradient);
    color: #fff;
    padding: 60px 0 50px;
}

.service-header h1 {
    font-weight: 700;
}

.page-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
}

.page-breadcrumb .breadcrumb-item a {
    color: rgba(255,255,255,0.7);
}

.page-breadcrumb .breadcrumb-item.active {
    color: rgba(255,255,255,0.9);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* ============================================================
   Features / Values
   ============================================================ */
.value-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.value-item:hover {
    background: var(--bg-light);
}

.value-item .icon-circle {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--primary);
}

/* ============================================================
   Admin Styles
   ============================================================ */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: #0f1e36;
    color: #fff;
    padding: 1rem 0;
    overflow-y: auto;
    z-index: 1000;
}

.admin-sidebar .brand {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 0.5rem;
}

.admin-sidebar .nav-item {
    padding: 0.6rem 1.5rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.15s;
    font-size: 0.9rem;
}

.admin-sidebar .nav-item:hover,
.admin-sidebar .nav-item.active {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.admin-sidebar .nav-item i {
    width: 22px;
    margin-right: 10px;
}

.admin-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    background: #f5f7fa;
}

.admin-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-card .card-title {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ============================================================
   Global Utility
   ============================================================ */
.bg-primary-light {
    background: var(--primary-light);
}

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

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Squared rounded corners */
.rounded-10 { border-radius: 10px; }

/* ============================================================
   Subservice Detail Page Molecule Icon
   ============================================================ */
.molecule-icon {
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.2;
    position: absolute;
    right: 20px;
    top: 20px;
}

/* ============================================================
   Responsive Tweaks
   ============================================================ */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2rem; }
    .hero-section { padding: 60px 0 50px; }
    .admin-sidebar { width: 200px; }
    .admin-content { margin-left: 200px; }
}

/* ============================================================
   Hero Logo on Index
   ============================================================ */
.hero-logo {
    height: 90px;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}
