﻿@import url('color.css');

/* #region banner容器样式 */

.headbanner-container {
    position: relative; 
    width: 100%; 
    overflow: hidden; 
}

.headbanner {
    width: 100%;
    height: 270px; 
    overflow: hidden;
}

.headbanner img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* 导航模块样式 - 定位在banner底部 */
.inside-nav {
    position: absolute;
    bottom: 0; /* 定位在容器底部 */
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.5); /* 白色透明背景 */
    backdrop-filter: blur(2px); /* 背景模糊效果，增强透明感 */  
    height: 52px; /* 固定导航条高度，确保hover背景高度一致 */
}

.inside-nav .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%; /* 充满整个导航条高度 */
    padding: 0 15px; /* 移至此处添加内边距，避免内容贴边 */
    background:var(--text-on-dark);
    border-bottom:1px solid var(--border);
}
.inside-nav .nav-left {
    height: 100%; 
}
.inside-nav .nav-right {
    height: 100%; 
}

.inside-nav .location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.inside-nav .location a {
    color: var(--text-primary);
    font-weight:bold;
}

.inside-nav .location a:hover {
    color: var(--link-hover);    
}

/* 右侧导航样式 */
.inside-nav .nav-list ul {
    display: flex;
    list-style: none;  
    height: 100%;  
}

.inside-nav .nav-list li {}

.inside-nav .nav-list a {
    color: var(--text-primary);
    font-weight:bold;
    font-size: var(--size-small);
    transition: all 0.2s ease;
    padding: 0 15px; /* 增加点击区域和间距 */
    height: 100%; /* 充满li高度 */
    display: flex;
    align-items: center; /* 文字垂直居中 */
    margin-left:5px;
}

.inside-nav .nav-list a:hover,.inside-nav .nav-list a.active {
    background: var(--text-primary);
    color: var(--text-on-dark);    
}

/* #endregion */

.inside-body {
    padding: 50px 0;    
}


/* #region  新闻列表*/

.inside-news {width:100%;}
.inside-news .news-list {width: 100%;}

.inside-news .news-item {
    display: flex;
    align-items: center;
    min-height: 100px;     
    margin-bottom:30px;
    padding:15px;
    background:var(--border-bg);
    border-radius:10px;
}

.inside-news .news-item a {
    display: flex;
    width: 100%;    
    color: inherit;    
}

.inside-news .news-photo {
    width: 160px; 
    height:120px;
    overflow:hidden;
    border-radius:5px;
    flex-shrink: 0; /* 不收缩 */
    margin-right: 30px;
}
.inside-news .news-photo img {
    width: 100%;
    height: 100%; 
    object-fit: cover; 
}

.inside-news .news-body {
    flex: 1;  
    overflow:hidden;
}
.inside-news .news-title {
    font-size: var(--size-large);
    font-weight: 500;
    margin-bottom: 20px;    
}

.inside-news .news-market {
    font-size:var(--size-small);
    color:var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 最多显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* 日期区域样式 - 固定宽度靠右 */
.inside-news .news-date {
    height: auto;
    width: 100px;
    flex-shrink: 0; /* 不收缩 */
    text-align: center; 
    display: flex; 
    flex-direction: column; /* 子元素垂直排列 */
    justify-content: center; /* 垂直方向居中 */  
}

.inside-news .date-day {
    display: block;
    font-size:var(--size-xlarge);
    font-weight: bold;        
}

.inside-news .date-mmyy {
    display: block;        
}   

.inside-news .news-page{margin:50px 0px;}

/* #endregion */




/*  #region  文章内容模块 */

.article-list {   
    display: flex;  
    gap: 50px;  /* 图片与右侧内容的间距 */
    width: 100%;  
    box-sizing: border-box;
    padding: 0 30px;
}

.article-photo {
    width: 300px;
    flex-shrink: 0;  /* 图片宽度固定不压缩 */
    align-self: flex-start;  /* 顶部对齐 */
}

.article-photo img {
    max-width: 100%;
    height: auto;
    display: block; 
    object-fit: cover;
    border:1px solid var(--border);
}

/* 右侧信息容器 - 包含信息项和简介模块 */
.article-mark {
    flex: 1;  /* 占据右侧全部剩余空间 */
}

/* 信息项样式 */
.mark-item {
    margin-bottom: 10px;
    line-height: 1.5;
}

.mark-item a{color:var(--link-default);}
.mark-item a:hover{color:var(--link-hover);}

/* 简介模块样式 - 位于信息项下方 */
.article-dec {
    display: flex;
    margin-top: 20px;  /* 与上方信息项保持距离 */
    width: 100%;       /* 占满右侧宽度 */
}

.dec-tit {
    background-color:var(--link-hover);
    color: white;
    writing-mode: vertical-rl;
    text-orientation: upright;
    text-align: center;
    padding: 0.5rem;
    align-self: stretch;
}

.dec-content {
    flex: 1;
    margin-left: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: stretch;
    text-align:justify;
}
    







.article-show {padding: 30px;}

.article-title {
    font-size: var(--size-xlarge);  
    color:var(--text-primary);
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--text-primary); 
}

.date-looks {
    text-align: center;
    margin-bottom: 20px;
    color:var(--text-primary);
    font-size:var(--size-small);
}
.date-looks .article-date {
    margin-right: 20px;
}

.content-photo {
    text-align: center;
    margin: 0 0 25px; /* 底部外边距，与内容区隔开 */
}

.content-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.article-content {    
    line-height: 1.8; 
    text-align:justify;
}

.article-content p {
    margin-bottom: 20px;
}

/* 内容中的图片也居中显示 */
.article-content img {
    display: block;
    margin: 15px auto;
    max-width: 100%;
    height: auto;
}

/*  #endregion */



/* #region 分页导航样式 */
.pagelist {
    clear: both;
    text-align: center;    
    margin: 30px 0;
}

/* 链接样式 */
.pagelist a {
    display: inline-block;
    background:var(--border);
    padding: 8px 15px;    
    margin-right: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
}

/* 链接 hover 效果 */
.pagelist a:hover {
    background: var(--text-primary);
    color: var(--text-on-dark);
    text-decoration: none;
}

/* 非链接元素样式（当前页、省略号、禁用状态） */
.pagelist span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--border-bg);
    margin-right: 10px;
    border-radius: 5px;
}

/* 当前页码样式 */
.pagelist span.current {
    background: var(--text-primary);
    color: var(--text-on-dark);
}

/* 省略号样式 */
.pagelist span.ellipsis {
    border: none;
    padding: 8px 5px;
}

/* 上一页/下一页禁用状态 */
.pagelist span.prev.disabled,
.pagelist span.next.disabled {
    color: #999;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 上一页/下一页链接样式 */
.pagelist a.prev,
.pagelist a.next {
    /* 可根据需要添加特殊样式 */
}

/* #endregion */


/*  #region  一村一品列表布局 */

.inside-brands{width:100%;}

.inside-brands .brands-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    width: 100%;   
    padding: 20px 0;
    min-width: 0;
}

.inside-brands .brands-item {
    width: 100%;
    min-width: 0;
}

.inside-brands .brands-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.inside-brands .brands-photo {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius:10px;
    border:1px solid var(--border);
}

.inside-brands .brands-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}


/* 优化的标题样式 - 确保最多两行并显示省略号 */
.inside-brands .brands-title {
    margin-top:15px;
    padding:0 10px;
    font-size: var(--size-small);
    line-height: 1.5;
    /* 精确控制两行高度 */
    max-height: 3em; /* 1.5行高 × 2行 = 3em */
    overflow: hidden;
    text-overflow: ellipsis;
    /* 关键属性：控制显示行数 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 最多显示2行 */
    -webkit-box-orient: vertical;
    /* 防止长单词溢出 */
    word-wrap: break-word;
    word-break: break-word;
    /* 移除可能干扰的属性 */
    white-space: normal;
    position: static;
    text-align:center;
    
}

/* 确保不添加多余的省略号 */
.inside-brands .brands-title::after {
    display: none;
}

.inside-brands .brands-page{margin:50px 0px;}




/*  #endregion */



/* #region 生活服务类别导航 */

.inside-info .info-sorts{margin-bottom:30px;}

.inside-info .info-sorts ul {
    display: flex;
    list-style: none;   
    flex-wrap: wrap;    
}

.inside-info .info-sorts li {
    margin-bottom: 20px;
    margin-right: 15px;
    /* 确保每个项目内的文字不换行 */
    white-space: nowrap;
}

.inside-info .info-sorts li a {
    color: var(--text-primary);
    font-size: var(--size-base);
    transition: all 0.2s ease;
    /* 移除高度100%限制，允许内容自然撑开 */
    /* height: 100%; */
    display: flex;
    align-items: center;
    margin-left: 5px;
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 5px;
}

.inside-info .info-sorts li a:hover,
.inside-info .info-sorts li a.active {
    background: var(--text-primary);
    color: var(--text-on-dark);
}
/*  #endregion */



/*  #region  企业列表布局 */

.inside-company{width:100%;}

.inside-company .company-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    width: 100%;   
    padding: 20px 0;
    min-width: 0;
}

.inside-company .company-item {
    width: 100%;
    min-width: 0;
}

.inside-company .company-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.inside-company .company-photo {
    width: 100%;
    aspect-ratio: 3/1;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius:10px;
}

.inside-company .company-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}


/* 优化的标题样式 - 确保最多两行并显示省略号 */
.inside-company .company-title {
    margin-top:15px;
    padding:0 10px;
    font-size: var(--size-small);
    line-height: 1.5;
    /* 精确控制两行高度 */
    max-height: 3em; /* 1.5行高 × 2行 = 3em */
    overflow: hidden;
    text-overflow: ellipsis;
    /* 关键属性：控制显示行数 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 最多显示2行 */
    -webkit-box-orient: vertical;
    /* 防止长单词溢出 */
    word-wrap: break-word;
    word-break: break-word;
    /* 移除可能干扰的属性 */
    white-space: normal;
    position: static;
    text-align:center;
    
}

/* 确保不添加多余的省略号 */
.inside-company .company-title::after {
    display: none;
}

.inside-company .company-page{margin:50px 0px;}




/*  #endregion */




/*  #region  品牌推广详情显示页 */

.brands{padding:20px 0px;}
.brands .content{background:var(--border-bg);padding-top:30px;}

.brands-show {
    width: 100%;
    margin: 0 auto;
    padding: 20px;   
}

/* 隐藏单选按钮 */
.tab-radio {
    display: none;
}

/* 标题切换栏 - 让内部标题整体居中 */
.tabs {
    display: flex;
    gap: 2px; /* 标题之间的间隔 */
    margin-bottom: 0px; /* 与下划线的距离 */
    justify-content: center; /* 关键：让内部元素水平居中 */
}

.tab-title {
    background-color: white;
    color: #333;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
   
}

/* 选中状态的标题样式 - 红底白字 */
#detail-tab:checked ~ .tabs label[for="detail-tab"],
#contact-tab:checked ~ .tabs label[for="contact-tab"] {
    background-color: var(--nav-bg);
    color: white;
}

/* 下划线样式 */
.tab-underline {
    height: 3px;
    background-color: var(--nav-bg);
    margin-bottom: 0px;
}

/* 内容区域 */
.tab-content {
     background:white;
    position: relative;
    min-height: 200px; /* 确保内容区域有足够高度 */
}

.brands-content, .brands-contact {
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
}

/* 默认显示详情内容，隐藏联系方式 */
.brands-contact {
    display: none;
}

/* 当选中联系方式时，显示联系方式内容，隐藏详情 */
#contact-tab:checked ~ .tab-content .brands-contact {
    display: block;
}

#contact-tab:checked ~ .tab-content .brands-content {
    display: none;
}

/* 内容样式美化 */
.brands-content p, .brands-contact p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}



/*  #endregion */
