/* 
 *AI-Enterprise-Spark
 * /assets/css/style-main.css
 */

@import "layouts/_header.css";
@import "layouts/_grid.css";
@import "layouts/_footer.css";
@import "components/_buttons.css";
@import "components/_cards.css";
@import "components/_forms.css";
@import "components/_back-to-top.css";
@import "pages/_home.css";
@import "pages/_product.css";
@import "pages/_blog.css";

.menu-item i[class^="fa-"] {
    margin-right: 0.5rem;
    width: 1.25em;
    text-align: center;
}

/* 移动端响应式设计（非常重要） */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }

    #primary-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    #primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1.5rem;
        display: none; /* 默认折叠 */
    }

    /* 可以在这里添加汉堡菜单的交互逻辑 */
}
/* 基础重置与布局 */
* {
    box-sizing: border-box; /* 改变盒模型计算方式，更直观 */
    margin: 0;
    padding: 0;
}

/* 全局样式 */
body {min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}
body ul {
    list-style-type: none;
    padding-left: 0;
}
html, body {
height: 100%;
    margin: 0;
}
 .content {
    flex: 1;
  }

/* 响应式基础 */
img {
    max-width: 100%;
    height: auto;
}

/* 产品页面特定样式 */
.single-product .entry-content {
    line-height: 1.8;
}

.single-product .entry-content h2 {
    margin: 1.5em 0 0.8em 0;
    color: #2c3e50;
}
/* 主内容区样式 */
.site-main { flex: 1;
    padding: 0.5rem 0;
}

/* 响应式图像 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 链接样式 */
a {
    color: #0073aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 产品网格布局 */
.product-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* 按钮组件样式 */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

.button:hover {
    background-color: #005a87;
}
/* 页脚 */
      
/* 页脚小工具区域 */
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/*------响应式设计 - 移动端优先--------max-width: 768px----------------------*/

@media screen and (max-width: 768px) 
{

body {
    display: flex; /* 使用Flexbox布局 */
    flex-direction: column; /* 垂直方向排列 */
    min-height: 100vh; /* 最小高度为整个视口高度 */
}
   .container {
        padding: 0 8px;
    }
 .product-archive-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
#page {
    flex: 1 0 auto; /* 主要内容区域应该伸缩并填充可用空间 */
}

.site-footer {
    flex-shrink: 0; /* 页脚不应该收缩 */
}

    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .site-footer {
        padding: 0.5rem 0;
    }
}
/*------响应式设计 - 移动端优先------ @media (max-width: 480px)---------------------*/
 @media (max-width: 480px){
 body {background: #f9f9f9;font-size:12px;}
 .container {
        padding: 0 5px;
    }
 
 }
 