/* ===== Component Styles ===== */

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  display: block;
  padding: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-bg-secondary);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 20px;
}

.card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.card__description {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ===== Note / Callout ===== */
.note {
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 8px;
  border-left: 4px solid;
}

.note--info {
  background: #eff6ff;
  border-color: #3b82f6;
}

.note--info .note__icon {
  color: #3b82f6;
}

.note--warning {
  background: #fffbeb;
  border-color: #f59e0b;
}

.note--warning .note__icon {
  color: #f59e0b;
}

.note--tip {
  background: #ecfdf5;
  border-color: #10b981;
}

.note--tip .note__icon {
  color: #10b981;
}

.note--danger {
  background: #fef2f2;
  border-color: #ef4444;
}

.note--danger .note__icon {
  color: #ef4444;
}

.note__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
}

.note__content {
  font-size: 14px;
  line-height: 1.6;
}

.note__content p:last-child {
  margin-bottom: 0;
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: var(--color-bg-secondary);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
}

tr:hover {
  background: var(--color-bg-secondary);
}

/* Data Table (for bilingual content) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  overflow: hidden;
}

.data-table thead {
  background: var(--color-bg-secondary);
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid var(--color-border);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* ===== Steps ===== */
.steps {
  counter-reset: step;
  margin: 24px 0;
}

.step {
  position: relative;
  padding-left: 48px;
  margin-bottom: 32px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.step__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.step__content {
  font-size: 15px;
  line-height: 1.7;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9999px;
}

.badge--beta {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge--new {
  background: #dcfce7;
  color: #15803d;
}

.badge--deprecated {
  background: #fee2e2;
  color: #b91c1c;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.breadcrumb__link {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.breadcrumb__link:hover {
  color: var(--color-primary);
}

.breadcrumb__separator {
  color: var(--color-border);
}

.breadcrumb__current {
  color: var(--color-text);
}

/* ===== Parameter Table (API Reference) ===== */
.param-table {
  width: 100%;
  margin: 16px 0;
}

.param-table th {
  text-align: left;
  padding: 8px 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.param-table td {
  padding: 12px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border-light);
}

.param-name {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-text);
}

.param-type {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-left: 8px;
}

.param-required {
  font-size: 11px;
  color: #ef4444;
  margin-left: 8px;
}

.param-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 40px;
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
  border: none;
}

.btn--primary:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 16px;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  .step {
    padding-left: 40px;
  }

  .step::before {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}
