/* ==================== 导航栏修复样式 ==================== */

/* 确保导航栏在一行显示 */
.navbar .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* 导航栏品牌 */
.navbar-brand {
    padding: 15px 10px;
    font-size: 20px !important;
}

.navbar-brand i {
    margin-right: 5px;
    font-size: 22px;
}

/* 导航链接样式优化 */
.navbar-nav > li > a {
    padding: 15px 18px !important;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.navbar-nav > li > a i {
    margin-right: 6px;
    font-size: 14px;
}

/* 导航栏菜单项间距 */
.navbar-nav {
    margin-left: 10px;
}

.navbar-nav > li {
    margin: 0 2px;
}

/* 搜索框样式修复 */
.navbar-form {
    margin: 8px 5px;
    padding: 0;
}

.navbar-form .input-group {
    width: 280px;
}

/* 搜索下拉框修复 */
.navbar-form select#type {
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px 0 0 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 25px;
}

.navbar-form select#type:focus {
    outline: none;
    background: #fff;
}

.navbar-form .form-control[name="kw"] {
    height: 34px;
    border: none;
    font-size: 13px;
}

.navbar-form .btn[type="submit"] {
    height: 34px;
    padding: 6px 12px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

.navbar-form .btn[type="submit"]:hover {
    background: #fff;
}

/* 右侧导航链接 */
.navbar-right > li > a {
    font-size: 14px;
    padding: 15px 14px !important;
    letter-spacing: 0.3px;
}

.navbar-right > li > a i {
    margin-right: 5px;
}

/* 搜索框与导航间距 */
.navbar-form {
    margin-left: 15px;
    margin-right: 15px;
}

/* 导航栏整体间距优化 */
.navbar-collapse {
    padding-left: 10px;
    padding-right: 10px;
    overflow: visible !important;
}

/* 确保导航栏不会裁剪下拉菜单 */
.navbar {
    overflow: visible !important;
}

/* 下拉菜单 */
.navbar .dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
}

.navbar .dropdown-menu > li > a {
    padding: 10px 20px;
    font-size: 13px;
}

.navbar .dropdown-menu > li > a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* 响应式调整 */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar-brand {
        font-size: 16px !important;
    }
    
    .navbar-nav > li > a {
        padding: 15px 8px !important;
        font-size: 12px;
    }
    
    .navbar-form .input-group {
        width: 200px;
    }
    
    .navbar-right > li > a {
        padding: 15px 8px !important;
        font-size: 12px;
    }
}

/* 小屏幕下的折叠菜单 */
@media (max-width: 767px) {
    .navbar-form {
        margin: 10px 15px;
        border: none;
        box-shadow: none;
    }
    
    .navbar-form .input-group {
        width: 100%;
    }
    
    .navbar-collapse {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        margin-top: 0;
    }
    
    .navbar-nav > li > a {
        padding: 12px 15px !important;
    }
}

/* 下拉菜单修复 - 确保能正常显示 */
.navbar .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    list-style: none;
    background-color: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.navbar .dropdown:hover .dropdown-menu,
.navbar .dropdown.open .dropdown-menu {
    display: block;
}

.navbar .dropdown-menu > li > a {
    display: block;
    padding: 10px 20px;
    clear: both;
    font-weight: 400;
    line-height: 1.42857143;
    color: #333;
    white-space: nowrap;
}

.navbar .dropdown-menu > li > a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* ==================== 页脚修复样式 ==================== */

.footer {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 0 30px;
    margin-top: 80px;
    border-radius: 30px 30px 0 0;
    clear: both;
    width: 100%;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section h4 i {
    margin-right: 8px;
    color: #f093fb;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: #f093fb;
    padding-left: 5px;
}

.footer-section p i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #00b894;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #f093fb;
}

/* 企业页面等特殊页面的footer修复 */
body > .container > .footer,
.container-fluid + .container > .footer {
    margin-left: -15px;
    margin-right: -15px;
    width: calc(100% + 30px);
}

/* 响应式页脚 */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }
    
    .footer-section h4 {
        margin-bottom: 15px;
    }
    
    .footer-section p i {
        display: inline-block;
        margin-right: 5px;
    }
}

/* 分页居中 */
.nav-pagination {
    text-align: center !important;
    margin: 30px 0;
}

.pagination {
    display: inline-flex !important;
    justify-content: center;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.back-to-top i {
    margin: 0;
}

/* ==================== 全局布局修复 ==================== */

/* 确保容器内浮动元素不会导致footer错位 */
.container {
    overflow: hidden;
}

/* 修复body下的container布局问题 */
body > .container {
    padding-bottom: 30px;
}

/* 修复float导致的footer错位问题 */
.clearfix {
    clear: both;
    display: block;
    width: 100%;
}

/* 修复企业页面和用户页面的row布局 */
.row::after {
    content: "";
    display: table;
    clear: both;
}

/* 修复panel在col-md-3中的margin问题 */
.col-md-3 .panel,
.col-md-9 .panel {
    margin-bottom: 20px;
}

/* 修复job和company index页面的列表布局 */
.job-list::after,
.company-list::after {
    content: "";
    display: table;
    clear: both;
}

/* 确保footer始终在底部，不受内容影响 */
.footer {
    position: relative;
    clear: both;
    float: left;
    width: 100%;
    margin-top: 50px;
}

/* 修复Bootstrap container嵌套问题 */
.footer .container {
    width: 100%;
    max-width: 1200px;
    padding-left: 20px;
    padding-right: 20px;
    overflow: visible;
}

/* 修复sidebar菜单样式 */
.panel .list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    transition: all 0.3s ease;
}

.panel .list-group-item:last-child {
    border-bottom: none;
}

.panel .list-group-item:hover,
.panel .list-group-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.panel .list-group-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 修复jumbotron内的表单布局 */
.jumbotron form {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.jumbotron .form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.jumbotron .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 40px;
}

.jumbotron .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 修复表格样式 */
.table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.table thead th {
    border: none;
    font-weight: 500;
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

/* 修复按钮组样式 */
.btn-group .btn {
    border-radius: 4px !important;
    margin: 0 2px;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

/* 修复分页样式 */
.pagination {
    margin: 30px 0;
}

.pagination > li > a,
.pagination > li > span {
    border: none;
    color: #667eea;
    margin: 0 3px;
    border-radius: 6px;
    padding: 10px 16px;
}

.pagination > li.active > a,
.pagination > li.active > span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.pagination > li > a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* 页脚全宽显示 */
.footer-wrapper {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative;
    left: 50%;
    right: 50%;
    transform: translateX(-50%);
}

.footer-wrapper .footer {
    border-radius: 0 !important;
    width: 100% !important;
}
