/* ============================================
   全局基础样式 - 兄弟电子官网
   ============================================ */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Source Han Sans CN", sans-serif;
}

/* CSS变量定义 */
:root {
    --primary-blue: #0078D7;
    --secondary-blue: #005A9E;
    --light-blue: #E6F2FF;
    --primary-gray: #F5F7FA;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #999999;
    --accent-orange: #FF7D00;
    /*--orange: #FF7D00;*/
    --accent-red: #FF3B30;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* HTML滚动行为 */
html {
    scroll-behavior: auto;
    scroll-padding-top: 110px;
}

body {
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   通用容器和布局
   ============================================ */
.section-padding {
    padding: 60px 0;
}


/*.section-padding:nth-child(odd) {*/
/*    background-color: var(--primary-gray);*/
/*}*/
/*body > .section-padding:nth-of-type(even) {*/
/*    background-color: var(--primary-gray);*/
/*}*/

/*不精准的写死每个框的颜色*/
.section-padding.white {
    background-color: var(--white) !important;
}

.section-padding.gray {
    background-color: var(--primary-gray) !important;
}


.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   按钮样式
   ============================================ */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    white-space: nowrap;
}

.btn.small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #E66C00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* ============================================
   标题样式
   ============================================ */

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--accent-orange);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 18px;
    color: var(--medium-gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

/* ============================================
   页面Banner
   ============================================ */
.page-banner {
    background: linear-gradient(135deg, var(--light-blue) 0%, #f0f8ff 100%);
    padding-top: 140px;
    padding-bottom: 60px;
    text-align: center;
}

.page-banner h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 20px;
}

.page-banner p {
    font-size: 20px;
    color: var(--medium-gray);
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    white-space: nowrap;
}

/* ============================================
   分页样式
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-item {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--white);
    border: 1px solid #e0e0e0;
}

.page-item:hover, .page-item.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}
.page-prev,
.page-next {
    width: auto;
    padding: 0 15px;
}

.page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
/* ============================================
   移动端底部工具栏
   ============================================ */

.mobile-tools {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 10px 0;
}

.mobile-tools-container {
    display: flex;
    justify-content: space-around;
}

.mobile-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--medium-gray);
    font-size: 12px;
}

.mobile-tool i {
    font-size: 20px;
    margin-bottom: 5px;
}

.mobile-tool.active {
    color: var(--primary-blue);
}



/* ============================================
   通用卡片组件
   ============================================ */

.card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}


.card-content {
    padding: 20px;
}

.card-title {
    /*font-size: 18px;*/
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 12px;
    line-height: 1.6;
}
/* ============================================
   通用容器尺寸
   ============================================ */

/*.container-small {*/
/*    max-width: 700px;*/
/*    margin: 0 auto;*/
/*}*/

/*.container-middle {*/
/*    max-width: 900px;*/
/*    margin: 0 auto;*/
/*}*/

/*.container-large {*/
/*    max-width: 1200px;*/
/*    margin: 0 auto;*/
/*}*/


/* ============================================
   通用标签/徽章组件
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    margin-right: 5px;
}

.badge-primary {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}


.badge i {
    margin-right: 8px;
}

/* ============================================
   通用按钮组
   ============================================ */

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   通用详情项（键值对展示）
   ============================================ */

.detail-item {
    display: flex;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-right: 8px;
}

.detail-value {
    color: var(--medium-gray);
}

/* ============================================
   Toast 提示组件
   ============================================ */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

.toast-icon.success {
    background-color: #34C759;
}

.toast-icon.error {
    background-color: var(--accent-red);
}

.toast-icon.warning {
    background-color: var(--accent-orange);
}

.toast-content h4 {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.toast-content p {
    color: var(--medium-gray);
    font-size: 14px;
}



/* 参数表格 */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.params-table th {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 15px;
    text-align: center;
    font-weight: 700;
}

.params-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.params-table td:first-child {
    white-space: nowrap;
}

.params-table tr:nth-child(even) {
    background-color: var(--primary-gray);
}
.params-table tr:nth-child(odd) {
    background-color: var(--white);
}

.params-table tr:last-child td {
    border-bottom: none;
}

/* 联系表单区域 */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 10px;
    padding: 50px;
    box-shadow: var(--shadow);
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.form-header p {
    color: var(--medium-gray);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-label.required::after {
    content: "*";
    color: var(--accent-red);
    margin-left: 5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: var(--white);
    color: var(--dark-gray);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.1);
}
.form-control.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    background-color: var(--white);
    appearance: none;
    padding-right: 40px;
    color: var(--dark-gray);
}
/*某些浏览器对 select 的 ::placeholder 支持有限*/
.form-control.select::placeholder{
    color: var(--light-gray) !important;
}
.form-control.select:invalid{
    color: var(--light-gray) !important;
}

.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border 0.3s;
    min-height: 120px;
    resize: vertical;
}
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox input {
    margin-right: 10px;
}

.form-checkbox label {
    color: var(--medium-gray);
    font-size: 14px;
}

.form-checkbox a {
    color: var(--primary-blue);
}

/*大图标*/
.icon-big {
    width: 80px;
    height: 80px;
    background-color: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 32px;
    /*margin: 0 auto 20px;*/
}

/* ============================================
   小屏手机优化 (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    html {
        scroll-behavior: auto;
        scroll-padding-top: 70px;
    }
    body {
        line-height: 1.2;
    }
    .section-padding {
        padding: 20px 0;
    }
    .section-title {
        font-size: 18px;
    }
    .section-subtitle {
        margin: 0 auto 10px;
        font-size: 14px;
    }
    .card-title {
        margin-top: 7px;
    }
    .card-content {
        padding: 0 10px 10px;
    }
    .card-desc {
        font-size: 12px;
    }
    .case-ref-link {
        margin-top: 5px;
        line-height: 2;
    }
    .page-banner {
        display: block;
        padding-top: 90px;
        padding-bottom: 20px;
    }
    .page-banner h1 {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .page-banner p {
        font-size: 14px;
        white-space: normal;
    }
    /* 参数表格 */
    .params-table {
        margin: 5px 0;
        border-radius: 5px;
        font-size: 14px;
    }

    .params-table th {
        padding: 9px 5px;
        white-space: nowrap;
    }

    .params-table td {
        padding: 5px 5px;
        border-bottom: 1px solid #eee;
    }

    /* ============================================
       通用标签/徽章组件
       ============================================ */
    .badge {
        padding: 5px 10px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 12px;
        margin-bottom: 5px;
    }
    .btn {
        padding: 8px 14px;
        border-radius: 4px;
        font-size: 14px;
    }
    .btn-outline {
        padding: 5px 13px;
        /*border-width: 1px;*/
    }
    .btn-group {
        gap: 5px;
    }
    .btn.small {
        padding: 4px 8px;
        font-size: 12px;
    }
    .pagination {
        gap: 5px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    .page-item {
        font-size: 12px;
    }
    .page-prev, .page-next {
        padding: 0 8px;
    }
    .page-item.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }
    /* 联系表单区域 */
    .form-container {
        padding: 20px;
    }
    .form-header {
        margin-bottom: 20px;
    }
    .form-control {
        padding: 6px 7px;
        border-radius: 4px;
        font-size: 12px;
    }
    .form-textarea {
        padding: 6px 7px;
        font-size: 12px;
        min-height: 100px;
    }
    .form-group {
        margin-bottom: 10px;
    }

    .form-row {
        margin-bottom: 10px;
    }
    /*大图标*/
    .icon-big {
        width: 50px;
        height: 50px;
        font-size: 26px;
    }
}