/* 
 * 智能预警系统 - 首页样式文件
 * 文件路径: frontend/resources/css/homepage.css
 * 设计风格: IoT 企业级专业视觉
 */

/* ========================================
   CSS 变量定义 - IoT 科技配色方案
   ======================================== */
:root {
    /* 主色调 - 科技蓝 */
    --iot-primary: #0066cc;
    --iot-primary-dark: #004d99;
    --iot-primary-light: #e6f2ff;
    
    /* 辅助色 - 稳重绿（安全/正常状态） */
    --iot-success: #00875a;
    --iot-success-light: #e6f5f0;
    
    /* 警告色 - 经典橙 */
    --iot-warning: #ff8c00;
    
    /* 背景色 */
    --iot-bg-dark: #1a1f36;
    --iot-bg-section: #f8fafc;
    --iot-bg-white: #ffffff;
    
    /* 文字色 */
    --iot-text-primary: #1a1f36;
    --iot-text-secondary: #5a6178;
    --iot-text-muted: #8892a6;
    --iot-text-white: #ffffff;
    
    /* 边框和分割线 */
    --iot-border: #e2e8f0;
    --iot-border-light: #f1f5f9;
    
    /* 阴影 */
    --iot-shadow-sm: 0 1px 3px rgba(26, 31, 54, 0.08);
    --iot-shadow-md: 0 4px 12px rgba(26, 31, 54, 0.1);
    --iot-shadow-lg: 0 8px 24px rgba(26, 31, 54, 0.12);
    --iot-shadow-hover: 0 12px 32px rgba(0, 102, 204, 0.15);
    
    /* 过渡动画 */
    --iot-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 圆角 */
    --iot-radius-sm: 6px;
    --iot-radius-md: 10px;
    --iot-radius-lg: 16px;
}

/* ========================================
   导航栏样式 - IoT 专业风格
   ======================================== */
.navbar-inverse {
    background: var(--iot-bg-dark);
    border: none;
    box-shadow: var(--iot-shadow-md);
}

.navbar-inverse .navbar-brand {
    color: var(--iot-text-white);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
    color: var(--iot-primary-light);
}

.navbar-inverse .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    padding: 15px 20px;
    transition: var(--iot-transition);
}

.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
    color: var(--iot-text-white);
    background-color: rgba(255, 255, 255, 0.08);
}

.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
    color: var(--iot-text-white);
    background-color: var(--iot-primary);
}

.navbar-inverse .navbar-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-inverse .navbar-toggle .icon-bar {
    background-color: var(--iot-text-white);
}

.navbar-inverse .navbar-collapse {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-inverse .navbar-nav .btn-link.logout {
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
}

.navbar-inverse .navbar-nav .btn-link.logout:hover {
    color: var(--iot-text-white);
    text-decoration: none;
}

/* ========================================
   基础布局
   ======================================== */
.homepage-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--iot-bg-white);
}

section {
    padding: 50px 0;
}

.section-header {
    margin-bottom: 35px;
    text-align: center;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--iot-text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--iot-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ========================================
   Hero Section - 科技感展示区
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, #1a2332 0%, #243447 50%, #0d4a7a 100%);
    color: var(--iot-text-white);
    padding: 70px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 科技网格背景效果 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 102, 204, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 204, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* 统计数据区 */
.statistics-bar {
    margin: 25px 0 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    padding: 10px 15px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #4db8ff;
    line-height: 1.1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* 操作按钮区 */
.hero-actions {
    margin-top: 20px;
}

.hero-actions .btn {
    margin: 0 6px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--iot-radius-sm);
    transition: var(--iot-transition);
    letter-spacing: 0.3px;
}

.hero-actions .btn-primary {
    background-color: var(--iot-primary);
    color: var(--iot-text-white);
    border: 2px solid var(--iot-primary);
}

.hero-actions .btn-primary:hover {
    background-color: var(--iot-primary-dark);
    border-color: var(--iot-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.hero-actions .btn-default {
    background-color: transparent;
    color: var(--iot-text-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-actions .btn-default:hover {
    background-color: var(--iot-text-white);
    color: var(--iot-bg-dark);
    border-color: var(--iot-text-white);
    transform: translateY(-2px);
}

/* ========================================
   功能特性区
   ======================================== */
.features-section {
    background-color: var(--iot-bg-white);
}

.feature-cards {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.feature-cards > [class*="col-"] {
    display: flex;
    padding: 0 10px;
    margin-bottom: 20px;
}

.feature-card {
    background: var(--iot-bg-white);
    padding: 24px 20px;
    border-radius: var(--iot-radius-md);
    border: 1px solid var(--iot-border);
    transition: var(--iot-transition);
    height: 100%;
    width: 100%;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--iot-shadow-hover);
    border-color: var(--iot-primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    border-radius: var(--iot-radius-sm);
    font-size: 22px;
    color: #fff;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--iot-text-primary);
    margin-bottom: 8px;
}

.feature-description {
    font-size: 13px;
    color: var(--iot-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   产品优势区
   ======================================== */
.advantages-section {
    background: linear-gradient(180deg, #f0f5fa 0%, #e8eff6 100%);
}

.advantage-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 -8px;
}

.advantage-items > [class*="col-"] {
    flex: 0 0 auto;
    padding: 0 8px;
}

@media (min-width: 1200px) {
    .advantage-items > [class*="col-"] {
        width: 19%;
    }
}

.advantage-item {
    text-align: center;
    padding: 20px 14px;
    margin-bottom: 16px;
    background: var(--iot-bg-white);
    border-radius: var(--iot-radius-sm);
    border: 1px solid var(--iot-border);
    transition: var(--iot-transition);
    height: 100%;
}

.advantage-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--iot-shadow-md);
    border-color: #0066cc;
}

.advantage-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00875a 0%, #00a86b 100%);
    border-radius: 50%;
    font-size: 20px;
    color: #fff;
    margin: 0 auto 12px;
}

.advantage-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--iot-text-primary);
    margin-bottom: 6px;
}

.advantage-description {
    font-size: 12px;
    color: var(--iot-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   应用场景区
   ======================================== */
.use-cases-section {
    background-color: var(--iot-bg-white);
}

.use-case-cards {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.use-case-cards > [class*="col-"] {
    display: flex;
    padding: 0 10px;
    margin-bottom: 20px;
}

.use-case-card {
    background: linear-gradient(145deg, #1a2332 0%, #243447 100%);
    color: var(--iot-text-white);
    padding: 24px 20px;
    border-radius: var(--iot-radius-sm);
    transition: var(--iot-transition);
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-left: 3px solid #0066cc;
}

.use-case-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: #0066cc;
    opacity: 0.1;
    border-radius: 0 0 0 100%;
}

.use-case-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--iot-shadow-lg);
    border-left-color: #4db8ff;
}

.use-case-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
    color: #4db8ff;
}

.use-case-description {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0;
    position: relative;
}

/* ========================================
   响应式设计
   ======================================== */

/* 平板端 (768px-1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 30px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .advantage-items > [class*="col-"] {
        width: 30%;
        margin-bottom: 16px;
    }
}

/* 移动端 (<768px) */
@media (max-width: 767px) {
    section {
        padding: 35px 0;
    }
    
    .hero-section {
        padding: 50px 0 40px;
    }
    
    .hero-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .statistics-bar {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .hero-actions .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
    
    .section-header {
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-subtitle {
        font-size: 13px;
    }
    
    .feature-card {
        padding: 20px 16px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .advantage-items {
        justify-content: space-between;
    }
    
    .advantage-items > [class*="col-"] {
        width: 48%;
        padding: 0 6px;
    }
    
    .advantage-item {
        padding: 16px 12px;
    }
}

/* 小屏幕手机 (<480px) */
@media (max-width: 479px) {
    .hero-title {
        font-size: 22px;
    }
    
    .hero-subtitle {
        font-size: 13px;
    }
    
    .stat-number {
        font-size: 22px;
    }
    
    .stat-item {
        padding: 8px 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .advantage-items > [class*="col-"] {
        width: 100%;
    }
    
    .advantage-item {
        padding: 18px 16px;
    }
}

