/**
 * Biooke Microelectronics Style
 * 最终修复：Logo空白下沉 + 联系排版错乱 + 移动端适配
 * Navbar固定70px
 */

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

:root {
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --card-bg: #ffffff;
    --text-dark: #2d3748;
    --text-light: #f7fafc;
    --text-muted: #718096;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

a {text-decoration: none; color: inherit;}
img {max-width: 100%; height: auto; display: block;}
ul,ol {list-style: none;}

h1,h2,h3,h4,h5,h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
h1 {font-size: 2.5rem;}
h2 {font-size: 2rem;}
h3 {font-size: 1.5rem;}
h4 {font-size: 1.25rem;}

p {margin-bottom: 1rem; line-height: 1.7;}

/* ========== 导航栏 固定70px ========== */
.navbar {
    background: var(--primary-gradient);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    height: 70px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 15px;
}

/* 关键：底部对齐，抵消logo上方大片空白 */
.navbar-brand {
    display: flex;
    align-items: flex-end;
    height: 100%;
    flex-shrink: 0;
}

/* PC端Logo 尺寸正常，不缩小 */
.navbar-brand img {
    height: 150px;
    width: auto;
    margin-bottom: 8px;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: var(--transition);
}
.nav-link:hover,.nav-link.active {color: #fff;}
.nav-link:hover::after,.nav-link.active::after {width: 100%;}

.nav-dropdown {position: relative;}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 9999;
}
.nav-dropdown:hover .dropdown-menu {display: block;}
.dropdown-item {
    display: block;
    padding: 10px 18px;
    color: #333;
    font-size: 14px;
}
.dropdown-item:hover {background: #f0f4ff; color: #667eea;}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.hero {
    background: var(--primary-gradient);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
}
.hero h1 {color: #fff;}
.hero p {opacity: 0.95; max-width: 700px; margin: 0 auto;}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-secondary {background: var(--primary-gradient); color: #fff;}
.btn-block {width: 100%;}

.section {padding: 4rem 0;}
.section-header {text-align: center; margin-bottom: 2.5rem;}

/* ========== 联系页面 【彻底修复乱版核心】 ========== */
.contact-section {padding: 4rem 0;}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.contact-info-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}
.contact-info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* 强制匹配HTML class="label / value" 彻底解决错乱 */
.contact-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.8rem !important;
    margin-bottom: 1.2rem !important;
}
.contact-item .label {
    min-width: 120px !important;
    font-weight: 600 !important;
    color: #555 !important;
    flex-shrink: 0 !important;
}
.contact-item .value {
    flex: 1 !important;
    color: #444 !important;
    word-break: break-word !important;
}

.contact-form-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.form-group {margin-bottom: 1.25rem;}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-start);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.about-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.footer {
    background: var(--darker-bg);
    color: #fff;
    padding: 3rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer-col h4 {color: #fff;}
.footer-col p,.footer-col a {color: rgba(255,255,255,0.7); line-height: 1.8;}
.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ========== 移动端适配 ========== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-gradient);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .nav-toggle {display: flex;}

    /* 手机端 两栏变一栏，彻底不乱 */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* 手机logo 往下移，解决太靠上 */
    .navbar-brand img {
        height: 130px;
        margin-bottom: 14px;
    }
}

@media (max-width: 768px) {
    .contact-info-card,.contact-form-card {
        padding: 1.5rem;
    }
    /* 小屏联系方式自动自适应 */
    .contact-item .label {
        min-width: 90px !important;
    }
}

@media (max-width: 480px) {
    /* 超小手机：标签+内容上下排列，完全不挤 */
    .contact-item {
        flex-direction: column !important;
        gap: 0.2rem !important;
    }
    .contact-item .label {
        min-width: auto !important;
    }
}

.mb-3 {margin-bottom: 1rem;}