/* ========================================
   iLink Pages — 通用页面级样式
   组队大厅 / 导师招贤 / 交流社区 / 竞赛目录 / 成果展示
   ======================================== */

/* === Page Wrapper === */
.il-page-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-16);
}

@media (max-width: 768px) {
  .il-page-wrapper {
    padding: var(--space-8) var(--space-4) var(--space-12);
  }
}

/* === Hero Section === */
.il-hero {
  text-align: left;
  margin-bottom: 48px;
}

.il-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--home-bg-warm);
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-accent);
  margin-bottom: var(--space-4);
}

.il-hero__eyebrow svg {
  width: 14px;
  height: 14px;
  stroke: var(--home-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.il-hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
}

.il-hero__desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .il-hero {
    margin-bottom: var(--space-8);
  }
  .il-hero__title {
    font-size: clamp(28px, 6vw, 36px);
  }
  .il-hero__desc {
    font-size: 16px;
  }
}

/* === Toolbar / Filter Bar === */
.il-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--home-radius);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-xs);
}

.il-toolbar--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.il-toolbar .il-search-field {
  flex: 1 1 280px;
  min-width: 200px;
}

.il-toolbar select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

@media (max-width: 768px) {
  .il-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
  }
  .il-toolbar .il-search-field {
    flex: unset;
    width: 100%;
  }
}

/* === Tabs (pill style) === */
.il-tabs {
  display: inline-flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg-gray);
  border-radius: var(--home-radius-pill);
}

.il-tab {
  padding: var(--space-1) var(--space-4);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--home-radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.il-tab:hover {
  color: var(--text-primary);
}

.il-tab--active {
  background: var(--bg-white);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* === CTA Button (pill) === */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff !important;
  background: var(--primary);
  border: none;
  border-radius: var(--home-radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast-home);
  text-decoration: none;
  white-space: nowrap;
}

.btn-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #ffffff !important;
}

.btn-cta:active {
  transform: scale(0.98);
}

.btn-cta span {
  color: #ffffff !important;
}

.btn-cta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Button-in-button trailing icon */
.btn-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all var(--transition-fast);
}

.btn-cta:hover .btn-cta__icon {
  transform: translate(1px, -1px) scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

/* === Secondary Button === */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--home-radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--bg-gray);
  border-color: var(--border-dark);
}

/* === Pagination === */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--space-2);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.page-btn:hover {
  background: var(--bg-gray);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.page-btn--active {
  background: var(--primary);
  color: var(--color-white);
  border-color: var(--primary);
}

.page-btn--active:hover {
  background: var(--primary-dark);
  color: var(--color-white);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === Empty State === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  text-align: center;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-4);
  color: var(--text-tertiary);
  opacity: 0.5;
}

.empty-state__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state__desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 360px;
}

/* === Card List Container === */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.card-list--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .card-list--grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* === Double Bezel (Doppelrand) === */
.card-bezel {
  padding: var(--space-2);
  background: var(--home-bg-warm);
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  transition: all var(--transition-fast-home);
}

.card-bezel:hover {
  background: color-mix(in srgb, var(--home-bg-warm) 80%, black);
  border-color: var(--home-border-strong);
  box-shadow: var(--shadow-md);
}

.card-bezel__core {
  padding: var(--space-6);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: calc(var(--home-radius) - 8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all var(--transition-fast);
}

/* === Scroll Reveal Animation === */
@keyframes ilink-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.ilink-reveal {
  animation: ilink-fade-up 600ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

/* Staggered children */
.ilink-reveal--stagger > *:nth-child(1) { animation-delay: 0ms; }
.ilink-reveal--stagger > *:nth-child(2) { animation-delay: 80ms; }
.ilink-reveal--stagger > *:nth-child(3) { animation-delay: 160ms; }
.ilink-reveal--stagger > *:nth-child(4) { animation-delay: 240ms; }
.ilink-reveal--stagger > *:nth-child(5) { animation-delay: 320ms; }
.ilink-reveal--stagger > *:nth-child(6) { animation-delay: 400ms; }
.ilink-reveal--stagger > *:nth-child(7) { animation-delay: 480ms; }
.ilink-reveal--stagger > *:nth-child(8) { animation-delay: 560ms; }
.ilink-reveal--stagger > *:nth-child(9) { animation-delay: 640ms; }
.ilink-reveal--stagger > *:nth-child(10) { animation-delay: 720ms; }
