/* 黄道吉日封面 K */

/* 基础重置和字体设置 */
:root {
  --primary-color: #e77979;
  --secondary-color: #f8f9fa;
  --text-color: #333;
  --light-gray: #e9ecef;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #f5f7fa;
}

.hdjr-html-box {
    margin-top: 0.55rem;
}

@media (max-width: 768px) {
    .hdjr-html-box {
        margin-top: 4.6rem;
    }
}

/* 主容器 */
.hd-fm {
  max-width: 1000px;
  margin: 0 auto;
  /*padding: 20px;*/
  padding-left: 15px;
  padding-right: 15px;
}

/* 分类盒子 */
.hd-fm-box {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 24px;
  overflow: hidden;
  transition: var(--transition);
}

.hd-fm-box:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hd-fm-box.hd-top {
  border-top: 3px solid var(--primary-color);
}

/* 分类标题 */
.hd-fm-title {
  text-align: center;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  color: #4a6bff;
  background-color: var(--secondary-color);
  border-bottom: 1px solid var(--light-gray);
}

/* 内容区域 */
.hd-fm-lr {
  padding: 16px;
}

/* 项目列表 */
.hdlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* 单个项目 */
.hdmc {
  transition: var(--transition);
}

.hdmc a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px 8px;
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--light-gray);
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  text-align: center;
  min-height: 60px;
  background: #dfd3d30d;
}

.hdmc a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.hdmc span {
  display: block;
  font-size: 16px;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .hdlist {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 768px) {
  .hdlist {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .hdmc a {
    padding: 10px 6px;
    min-height: 50px;
  }
  
  .hdmc span {
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .hdlist {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .hd-fm {
    padding: 10px;
  }
  
  .hd-fm-title {
    padding: 12px 16px;
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .hdlist {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* 黄道吉日封面 j */