/**
 * 应用程序样式文件
 * 北京亿兆未来宽带网络技术有限公司 - SPA应用样式
 */

/* 基础样式重置 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主内容区域 */
#main-content {
    flex: 1;
    min-height: 400px;
    padding: 0px 0;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #004e92;
    font-size: 16px;
}

.loading-spinner:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #004e92;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 错误状态样式 */
.error {
    text-align: center;
    padding: 60px 20px;
    color: #d32f2f;
    font-size: 16px;
    background-color: #ffeaea;
    border-radius: 5px;
    margin: 20px;
}

/* 消息提示样式 */
.app-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.app-message.info {
    background-color: #2196f3;
}

.app-message.success {
    background-color: #4caf50;
}

.app-message.warning {
    background-color: #ff9800;
}

.app-message.error {
    background-color: #f44336;
}

/* 导航激活状态增强 */
.nav-menu li.active {
    background-color: #337ab7;
}

.nav-menu li.active a {
    background-color: #337ab7;
    color: #ffffff !important;
    font-weight: normal;
}

.nav-menu li:hover {
    background-color: #337ab7;
}

.nav-menu li:hover a {
    background-color: #337ab7;
    color: #ffffff !important;
}

/* 确保只有一个菜单项高亮 */
.nav-menu li {
    transition: all 0.3s ease;
}

.nav-menu a {
    transition: all 0.3s ease;
}

/* 页面过渡效果 */
#main-content {
    transition: opacity 0.3s ease-in-out;
}

#main-content.loading {
    opacity: 0.7;
}

/* 响应式导航 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        background: #004e92;
        color: white;
        border: none;
        padding: 10px 15px;
        cursor: pointer;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1000;
        width: 60px;
    }

    .new-main-nav {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        width: 100%;
        background-color: #004e92;
        z-index: 999;
    }

    .new-main-nav.mobile-active {
        display: block;
    }

    .new-main-nav ul {
        flex-direction: column;
        height: auto;
    }

    .new-main-nav li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #337ab7;
    }
}

/* 表单验证样式 */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #004e92;
    box-shadow: 0 0 5px rgba(0, 78, 146, 0.3);
}

.form-control.error {
    border-color: #d32f2f;
    box-shadow: 0 0 5px rgba(211, 47, 47, 0.3);
}

.error-message {
    display: block;
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
}

/* 按钮样式增强 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #004e92;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #003d75;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn.btn-secondary {
    background-color: #6c757d;
}

.btn.btn-secondary:hover {
    background-color: #545b62;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: #004e92;
    margin-bottom: 10px;
}

.card-content {
    color: #666;
    line-height: 1.6;
}

/* 网格布局 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
    min-width: 0;
}

.col-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
}

.col-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-9 {
    flex: 0 0 75%;
    max-width: 75%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .row {
        margin: 0;
    }

    .col,
    [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 20px;
    }
}

/* 页面特定样式 */
.page-header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #004e92 0%, #337ab7 100%);
    color: white;
    margin-bottom: 40px;
}

.page-title {
    font-size: 36px;
    margin: 0 0 10px 0;
    font-weight: 300;
}

.page-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* 搜索结果样式 */
.search-results {
    margin: 20px 0;
}

.search-result-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #004e92;
}

.search-result-title {
    color: #004e92;
    font-size: 18px;
    margin: 0 0 5px 0;
}

.search-result-info {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.p-10 {
    padding: 10px;
}

.p-20 {
    padding: 20px;
}

.p-30 {
    padding: 30px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }

    .new-main-nav,
    #site_footer,
    .mobile-menu-toggle {
        display: none !important;
    }

    #main-content {
        margin: 0;
        padding: 0;
    }
}