/*
 Theme Name:   astra-child
 Description:  astra 的子主题
 Author:       余元
 Template:     astra
 Version:      1.0.1
 Text Domain:  astra-child
*/

/* =========================================
   自定义 Header 样式
   ========================================= */

/* --- 1. 顶部栏样式 (Top Bar) --- */
.top-bar {
    background-color: #f8f9fa; /* 浅灰背景 */
    border-bottom: 1px solid #eaeaea;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
}

.my-header-inner {
    display: flex;
    justify-content: space-between; /* 左右两端对齐 */
    align-items: center;
    width: 100%;
    max-width: 1200px; /* 限制最大宽度，防止在大屏上太散 */
    margin: 0 auto;    /* 居中 */
    padding: 0 20px;
}

/* 社交链接区域 */
.top-bar-left {
    display: flex;
    align-items: center;
}

.social-links a {
    margin-right: 15px;
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 16px; /* 图标大小 */
}
.social-links a:hover {
    color: #00b0bd; /* 悬停颜色 */
}

/* 联系方式区域 (右侧) */
.top-bar-right {
    display: flex;
    align-items: center;
}

.contact-info span {
    margin-left: 20px;
    display: inline-flex;
    align-items: center; /* 确保图标和文字垂直居中 */
    white-space: nowrap; /* 防止换行 */
}

.contact-info i {
    margin-right: 8px; /* 图标与文字的间距 */
    color: #00b0bd;    /* 图标颜色：青色 */
    font-size: 16px;
}

/* --- 2. 主导航栏样式 (Main Nav) --- */
.main-navigation-bar {
    background-color: #fff;
    padding: 15px 0; /* 稍微增加高度 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    z-index: 100;
}

/* Logo 区域 */
.site-branding {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 60px; /* Logo 高度限制 */
    width: auto;
    display: block;
}

/* 菜单区域 (中间) */
.my-main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

/* 一级菜单项 */
.main-menu > li {
    position: relative; /* 【关键】作为子菜单定位的参考点 */
    margin: 0 5px;
}

.main-menu > li > a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 10px 15px; /* 增加点击区域 */
    display: block;
    transition: all 0.3s ease; /* 平滑过渡动画 */
    border-radius: 4px; /* 圆角效果 */
}

/* 【优化点2】鼠标悬停时：底色变蓝，字体变白 */
.main-menu > li:hover > a {
    background-color: #00b0bd; 
    color: #fff;
}

/* --- 3. 下拉菜单 (Sub Menu) 样式 --- */

/* 默认隐藏子菜单 */
.my-main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;      /* 在父级正下方 */
    left: 0;        /* 【优化点1】左侧与父级菜单左边对齐 */
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 200px; /* 下拉框最小宽度 */
    z-index: 1000;
    padding: 10px 0;
    margin-top: 0;    /* 紧贴父级 */
    list-style: none;
}

/* 鼠标悬停显示子菜单 */
.main-menu > li:hover .sub-menu {
    display: block;
}

/* 子菜单项样式 */
.my-main-navigation .sub-menu li {
    width: 100%;
}

.my-main-navigation .sub-menu a {
    padding: 10px 20px;
    display: block;
    color: #333;
    text-decoration: none;
    font-weight: normal;
    border-bottom: 1px solid #f0f0f0; /* 分割线 */
    transition: all 0.2s;
}

/* 子菜单项悬停效果 */
.my-main-navigation .sub-menu a:hover {
    background-color: #f8f9fa;
    color: #00b0bd;
    padding-left: 25px; /* 简单的位移动画 */
}

/* --- 4. 搜索区域 (右侧) --- */
.header-search-area {
    flex: 0 0 auto;
    margin-left: 20px;
}

.search-form {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.search-field {
    border: none;
    padding: 8px 12px;
    outline: none;
    width: 150px;
}

.search-submit {
    background-color: #00b0bd;
    color: #fff;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.3s;
}
.search-submit:hover {
    background-color: #008c96;
}

/* --- 5. 移动端简单适配 --- */
@media (max-width: 768px) {
    .my-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .top-bar-left, .top-bar-right {
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .main-navigation-bar .my-header-inner {
        flex-direction: column;
    }
    
    .my-main-navigation {
        margin: 20px 0;
        width: 100%;
    }
    
    .main-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .main-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    /* 邮箱链接样式 */
.contact-email a {
    display: inline-flex;
    align-items: center;
    color: #333;          /* 默认文字颜色 */
    text-decoration: none; /* 去掉默认的下划线 */
    transition: color 0.3s;
}

/* 鼠标悬停效果 */
.contact-email a:hover {
    color: #00b0bd;       /* 悬停时变为青色，与你的主题色一致 */
}

/* 悬停时图标也变色 */
.contact-email a:hover i {
    color: #00b0bd;
}
    
    /* 移动端子菜单改为相对定位，直接展开 */
    .my-main-navigation .sub-menu {
        position: relative;
        box-shadow: none;
        background: #f9f9f9;
    }
}



/* =========================================
   自定义footer 样式
   ========================================= */

/* Footer 基础样式 */
.site-footer {
    background-color: #222; /* 深色背景 */
    color: #bbb;
    padding-top: 60px;
    font-family: sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
   font-size: 14px;  
}

.footer-col {
    width: 23%; /* 4列布局 */
    margin-bottom: 40px;
}

/* 响应式：手机端变为单列 */
@media (max-width: 768px) {
    .footer-col {
        width: 100%;
    }
}

.footer-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: bold;
}

/* 第一栏：联系方式 */
.footer-info-item {
    display: flex;
    margin-bottom: 5px;
}
.footer-info-item .icon {
    margin-right: 15px;
    margin-left: 0px;
    color: #00bfa5; /* 绿色图标 */
}
.footer-info-item p {
   margin-bottom: 5px;
}

/* 第二栏：新闻列表 */
.news-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}
.news-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}
.news-content a {
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}
.news-content .date {
    font-size: 12px;
    color: #777;
}

/* 第三栏：产品目录 */
.product-list {
    list-style: none;
    padding: 0;
    margin-left: 0px;
}
.product-list li {
    border-bottom: 1px dashed #444; /* 虚线分割 */
    padding: 10px 0;
}
.product-list li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}
.product-list li a:hover {
    color: #00bfa5;
    padding-left: 5px;
}

/* 第四栏：表单 */
/* 针对输入框和文本域 */
#consult-form input, 
#consult-form textarea {
    width: 100%;
    background: #1a1a1a; /* 修改1：背景改为 #1a1a1a */
    border: 1px solid #444;
    color: #ffffff;      /* 额外优化：文字改成白色，在深色背景下才看得清 */
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    font-size: 14px;     /* 修改2：提示字号改为14px */
}

/* 针对占位符（placeholder）的颜色调整，使其在深色背景下清晰可见 */
#consult-form input::placeholder,
#consult-form textarea::placeholder {
    color: #888888;
    font-size: 14px;
}

/* 发送咨询按钮（默认状态：图2样式） */
#submit-btn {
    background-color: transparent; /* 去掉蓝色背景 */
    color: #ffffff;               /* 白色文字 */
    border: 1px solid #ffffff;    /* 白色边框 */
    padding: 10px 20px;
    cursor: pointer;
    width: 100%;
    font-weight: lighter;
    font-size: 14px;              /* 保持统一的字号 */
    border-radius: 4px;           /* 稍微加一点圆角更好看，如果不需要可删除 */
    transition: all 0.3s ease;    /* 添加过渡动画，让变色更平滑 */
}


/* 发送咨询按钮（鼠标悬停状态：图3样式） */
#submit-btn:hover {
    background-color: #00bfa5;    /* 悬停时变为青色背景 */
    color: #ffffff;               /* 保持白色文字 */
    border-color: #00bfa5;        /* 边框也变为青色，彻底融合 */
}

/* 页脚底部区域 */
.footer-bottom {
    background-color: #1a1a1a;
    text-align: center;
    /* 新增：使用 Flex 布局让元素横向排列并居中 */
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    gap: 15px;               /* 版权文字和公司名之间的间距，可自行调整 */
    padding: 15px 0;         /* 增加上下内边距，代替原本的 line-height 撑高 */
    font-size: 14px;         /* 修改：整体字号设为14px */
}

/* 针对 Copyright 文字（通常默认是灰色，如果需要可去掉颜色，保持默认即可） */
.footer-bottom p {
    margin: 0;               /* 消除 p 标签自带的外边距，防止影响 Flex 对齐 */
}

/* 针对公司链接 */
.footer-bottom a {
    color: #00bfa5;          /* 修改：公司名改为青色 */
    text-decoration: underline;
    text-underline-offset: 1px;
    /* 去掉原先的 line-height: 39px，因为 Flex 已经负责垂直居中了 */
    line-height: normal;     
    transition: color 0.3s ease; /* 增加平滑变色效果 */
}

/* 增加一个鼠标悬停效果（可选，让青色稍微变深一点） */
.footer-bottom a:hover {
    color: #009688; 
}







/* =========================================
   各网页面包屑的样式
   ========================================= */
