/* ============================================================
   企业文化 · 手风琴 Accordion
   ============================================================ */

/* ---------- 基础重置（仅作用于本组件） ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- 页面与版块容器 ---------- */
.subnavs .sub_ li {
    padding: 10px 0px;
    background: none;
    height: 64px;
    line-height: 44px;
}

.culture {
  width: 100%;
  padding: 60px 0.4rem 0px;      /* 全屏展示，左右仅留 0.4rem 边距 */
}

/* ============================================================
   手风琴主体（桌面端 · 横向）
   ============================================================ */
.accordion {
  display: flex;
  height: 540px;
  gap: 8px;
}

/* 单个面板：默认收起为窄条（flex-grow 过渡实现手风琴） */
.panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  background: #f2f3f5;
  transition: flex-grow 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 展开面板：变宽，手风琴核心效果 */
.panel.active {
  flex-grow: 2.4;                 /* 3 个收起(1) + 1 个展开(2.4) → 展开约占 43% */
}

.panel-inner {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
}

/* ---------- 文字内容区 ---------- */
.p-text {
  position: relative;
  width: 33.333%;                 /* 文字 : 图片 = 1 : 2 */
  padding: 40px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(160deg, #2f333a 0%, #23262b 100%);
  transition: width 0.5s ease, background 0.5s ease, padding 0.5s ease;
  overflow: hidden;
}

.p-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 26px;
  color: #f5821f;                 /* 橙色图标点缀 */
  flex-shrink: 0;
}
.p-icon svg { width: 100%; height: 100%; display: block; }

.p-en {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f5821f;
  margin-bottom: 10px;
  line-height: 1.4;
}

.p-title {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}

.p-desc {
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.9;
  color: #d7dade;
  max-width: 460px;
}

/* 箭头 */
.p-arrow {
  position: absolute;
  right: 26px;
  bottom: 26px;
  font-size: 24px;
  color: #f5821f;
  transition: transform 0.35s ease;
}

/* ---------- 背景图区（展开时显示） ---------- */
.p-img {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #3a4048, #1d2024);
  transition: opacity 0.5s ease;
}

/* 各面板背景色变化，增强区分 */
.p-img--vision     { background: radial-gradient(circle at 30% 30%, #3b5568, #17242e); }
.p-img--values     { background: radial-gradient(circle at 30% 30%, #5c4433, #2a1e15); }
.p-img--philosophy { background: radial-gradient(circle at 30% 30%, #3c5240, #16271a); }

/* 展示牌图片：等比缩放、完整显示、居中 */
.p-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

/* ============================================================
   收起状态（非展开面板）
   ============================================================ */
/* 收起时：浅灰底 + 深色文字 + 垂直居中，仅保留图标与标题 */
.panel:not(.active) .p-text {
  width: 100%;
  background: #f4f5f7;
  color: #23262b;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 26px 12px;
}

.panel:not(.active) .p-icon {
  margin-bottom: 16px;
  color: #f5821f;
}

.panel:not(.active) .p-en,
.panel:not(.active) .p-desc {
  display: none;
}

.panel:not(.active) .p-title {
  font-size: 24px;
}

.panel:not(.active) .p-arrow {
  right: 14px;
  bottom: 14px;
  font-size: 20px;
}

/* 收起时隐藏背景图区 */
.panel:not(.active) .p-img {
  width: 0;
  flex: 0;
  opacity: 0;
}

/* ---------- 悬停反馈 ---------- */
.panel:not(.active):hover .p-text {
  background: #ececef;
}

.panel.active .p-arrow {
  transform: rotate(90deg);
}

/* ============================================================
   响应式
   ============================================================ */

/* ---------- 平板（<=1024） ---------- */
@media (max-width: 1024px) {
  .culture { padding: 50px 0.4rem 70px; }
  .accordion { height: 480px; }
  .p-text { padding: 30px 24px; }
  .p-title { font-size: 26px; }
  .p-desc { font-size: 15px; }
}

/* ---------- 移动端（<=768）：切换为纵向手风琴 ---------- */
@media (max-width: 768px) {
  .culture { padding: 40px 0.4rem 60px; }
  .culture-head .head-zh { font-size: 32px; }

  .accordion {
    flex-direction: column;
    height: auto;
    gap: 10px;
  }

  /* 收起面板为固定高度条 */
  .panel {
    flex: none;
    height: 82px;
    transition: height 0.45s ease;
  }
  .panel.active { height: auto; }

  .panel-inner {
    position: relative;
    height: 100%;
    display: block;
    overflow: hidden;
  }
  .panel.active .panel-inner { height: auto; display: flex; flex-direction: column; }

  /* 收起时隐藏展示牌图片，展开时再显示 */
  .panel:not(.active) .p-img { display: none; }

  .panel .p-text {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 18px 20px;
    background: #f4f5f7;
    color: #23262b;
  }

  .panel .p-icon {
    margin: 0 20px 0 0;
    width: 44px;
    height: 44px;
  }

  .panel .p-head { flex: 1; }
  .panel .p-title { font-size: 22px; white-space: nowrap; }
  .panel .p-en { display: none; }

  /* 收起：隐藏描述，箭头靠右 */
  .panel:not(.active) .p-desc { display: none; }
  .panel:not(.active) .p-arrow {
    position: static;
    margin-left: 16px;
    font-size: 22px;
    transform: none;
  }

  /* 展开：显示描述，转为纵向排版 */
  .panel.active .p-text {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 26px 24px;
    background: linear-gradient(160deg, #2f333a 0%, #23262b 100%);
    color: #ffffff;
  }
  .panel.active .p-icon { margin: 0 0 18px; color: #f5821f; }
  .panel.active .p-title { color: #ffffff; white-space: normal; }
  .panel.active .p-en {
    display: block;
    color: #f5821f;
    margin-bottom: 8px;
  }
  .panel.active .p-desc {
    display: block;
    margin-top: 16px;
    color: #d7dade;
  }
  .panel.active .p-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    transform: rotate(90deg);
  }

  /* 展开：顶部展示对应的展示牌图片横幅 */
  .panel.active .p-img {
    display: flex;
    order: -1;                 /* 让图片置于文字上方 */
    flex: 0 0 200px;
    width: 100%;
    height: 200px;
  }
}

/* ---------- 超小屏（<=420） ---------- */
@media (max-width: 420px) {
  .culture { padding: 30px 0.4rem 50px; }
  .culture-head .head-zh { font-size: 28px; }
  .panel .p-title { font-size: 20px; }
  .panel .p-desc { font-size: 14px; }
}
