/* 免费资源中心：侧边栏 + 滚动联动 + 卡片网格 */

.free-resources-wrap {
  background: #f7f8fa;
}

/* 本页导航栏为白底黑字（背景为白色/浅色） */
.free-resources-wrap .home-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.free-resources-wrap .home-logo,
.free-resources-wrap .home-nav,
.free-resources-wrap .home-nav-item,
.free-resources-wrap .home-nav-link,
.free-resources-wrap .home-lang-btn {
  color: rgba(17, 24, 39, 0.92);
}

.free-resources-wrap .home-nav-item:hover,
.free-resources-wrap .home-nav-link:hover,
.free-resources-wrap .home-lang-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
}

.free-resources-wrap .home-nav-item-active::after {
  background: #111827;
}

.free-resources-wrap .home-auth-avatar {
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
}

.free-resources-wrap .home-auth-avatar:hover {
  background: rgba(15, 23, 42, 0.10);
}

.fr-layout {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 26px;
  padding: 92px 32px 56px;
  box-sizing: border-box;
  min-height: 100vh;
}

.fr-sidebar {
  position: sticky;
  top: calc(var(--home-header-height, 68px) + 18px);
  align-self: start;
}

.fr-nav {
  background: #ffffff;
  border-radius: 18px;
  padding: 12px 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.fr-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 16px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.fr-nav-item:hover {
  background: #eef9f2;
  color: #065f46;
  transform: translateY(-1px);
}

.fr-nav-item.is-active {
  background: #e8f7ee;
  color: #065f46;
  font-weight: 700;
}

.fr-nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(17, 24, 39, 0.88);
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.fr-nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fr-nav-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  color: rgba(55, 65, 81, 0.92);
}

.fr-nav-item:hover .fr-nav-icon {
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.18);
}

.fr-nav-item.is-active .fr-nav-icon {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.22), rgba(22, 163, 74, 0.12));
  border-color: rgba(22, 163, 74, 0.30);
  color: #065f46;
}

.fr-nav-item.is-active .fr-nav-label {
  color: #065f46;
}

.fr-content {
  min-width: 0;
}

.fr-section {
  background: transparent;
  padding: 12px 0 36px;
  scroll-margin-top: calc(var(--home-header-height, 68px) + 18px);
}

.fr-section + .fr-section {
  border-top: 1px solid rgba(229, 231, 235, 0.9);
}

.fr-section-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin: 8px 0 18px;
}

.fr-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #111827;
}

.fr-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #166534;
  background: #e8f7ee;
}

.fr-tabs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fr-tab {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(17, 24, 39, 0.84);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.fr-tab:hover {
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.20);
  color: #065f46;
  transform: translateY(-1px);
}

.fr-tab.is-active {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(22, 163, 74, 0.28);
}

.fr-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 34px 26px;
  align-items: stretch;
}

.fr-card {
  background: #ffffff;
  border: none;
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;

  position: relative;
}

.fr-card:hover {
  transform: none;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  z-index: 2;
}

.fr-card-logo {
  height: 136px;
  border-radius: 20px;
  background: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: #111827;
  letter-spacing: 0.02em;
  box-shadow: none;
  overflow: hidden;
}

.fr-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 22px;
  box-sizing: border-box;
}

.fr-card-title {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 900;
  color: #111827;
  text-align: center;
}

.fr-card-desc {
  margin: 0;
  font-size: 13px;
  color: rgba(17, 24, 39, 0.56);
  line-height: 1.8;
  flex: 1;
  text-align: center;
}

@media (max-width: 1024px) {
  .fr-layout {
    grid-template-columns: 1fr;
    padding: 92px 16px 48px;
  }

  .fr-sidebar {
    position: relative;
    top: auto;
  }

  .fr-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .fr-nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }

  .fr-nav-icon {
    width: 38px;
    height: 38px;
    font-size: 13px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .fr-nav-label {
    font-size: 13px;
    text-align: left;
  }

  .fr-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fr-card-grid {
    grid-template-columns: 1fr;
  }
}

