/* Guide pages — mobile-first layout for 嘉宾导航 */

.guide-page {
  --guide-rose: #be123c;
  --guide-rose-soft: #fff1f2;
  --guide-text: #433422;
  --guide-text-muted: #64748b;
  --guide-surface: rgba(255, 255, 255, 0.92);
  --guide-border: rgba(244, 63, 94, 0.14);
  --guide-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(59, 130, 246, 0.04);
  --guide-card-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.75) inset;
  --guide-card-shadow-hover: 0 14px 32px -10px rgba(59, 130, 246, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset;

  position: relative;
  overflow: hidden;
  padding-block: 1rem 2.5rem;
}

@media (min-width: 640px) {
  .guide-page {
    padding-block: 1.5rem 3rem;
  }
}

.guide-page__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 15% 0%, rgba(219, 234, 254, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(209, 250, 229, 0.4), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(248, 250, 252, 0.95) 100%);
}

.guide-page__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .guide-page__container {
    padding-inline: 1.5rem;
  }
}

/* Breadcrumb */
.guide-breadcrumb {
  margin-bottom: 0.75rem;
}

.guide-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .guide-breadcrumb ol {
    font-size: 0.875rem;
  }
}

/* Hero */
.guide-hero {
  border-radius: 1rem;
  border: 1px solid var(--guide-border);
  background: var(--guide-surface);
  box-shadow: var(--guide-shadow);
  padding: 1.125rem 1rem;
}

@media (min-width: 640px) {
  .guide-hero {
    padding: 1.5rem 1.75rem;
    border-radius: 1.125rem;
  }
}

.guide-hero__row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.guide-hero__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  font-size: 1.375rem;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.15);
}

@media (min-width: 640px) {
  .guide-hero__icon {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.5rem;
  }
}

.guide-hero__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.guide-hero__title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--guide-text);
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .guide-hero__title {
    font-size: 2rem;
  }
}

.guide-hero__accent {
  height: 3px;
  width: 2.5rem;
  margin-top: 0.4rem;
  background: linear-gradient(90deg, #3b82f6, rgba(59, 130, 246, 0.15));
  border-radius: 2px;
}

.guide-hero__count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: 0.625rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(59, 130, 246, 0.18);
  font-size: 1.125rem;
  font-weight: 800;
  color: #2563eb;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.guide-hero__subtitle {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #475569;
  line-height: 1.45;
}

.guide-hero__subtitle-en {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--guide-text-muted);
  line-height: 1.4;
}

/* Document list */
.guide-docs {
  margin-top: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .guide-docs {
    margin-top: 1.5rem;
    gap: 0.875rem;
  }
}

.guide-doc-card {
  display: block;
  border-radius: 0.875rem;
  border: 1px solid var(--guide-border);
  background: #fff;
  padding: 1rem;
  box-shadow: var(--guide-card-shadow);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 640px) {
  .guide-doc-card {
    padding: 1.125rem 1.25rem;
  }
}

.guide-doc-card:hover,
.guide-doc-card:focus-visible {
  box-shadow: var(--guide-card-shadow-hover);
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.22);
  outline: none;
}

.guide-doc-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.guide-doc-card__title {
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.35;
  color: #0f172a;
  transition: color 0.15s ease;
}

@media (min-width: 640px) {
  .guide-doc-card__title {
    font-size: 1.25rem;
  }
}

.guide-doc-card:hover .guide-doc-card__title {
  color: #1d4ed8;
}

.guide-doc-card__summary {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-doc-card__meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
  font-size: 0.6875rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.guide-doc-card__views {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 600;
}

.guide-doc-card__attachments {
  margin-top: 0.625rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.guide-doc-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.guide-doc-card__arrow {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1d4ed8 !important;
}

.guide-doc-card__arrow svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s ease;
}

.guide-doc-card:hover .guide-doc-card__arrow svg {
  transform: translateX(2px);
}

/* Attachments section */
.guide-attachments-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.guide-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--guide-text);
  margin-bottom: 0.875rem;
}

@media (min-width: 640px) {
  .guide-section-title {
    font-size: 1.25rem;
  }
}

.guide-section-title__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  font-size: 0.875rem;
}

.guide-attachments {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.guide-attachment-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  padding: 0.875rem 1rem;
  box-shadow: var(--guide-card-shadow);
}

@media (min-width: 640px) {
  .guide-attachment-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.125rem;
  }
}

.guide-attachment-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.guide-attachment-card__desc {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.guide-attachment-card__filemeta {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  color: #94a3b8;
}

.guide-attachment-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.guide-btn:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}

/* Beat global `a` color overrides in custom.css (pink-on-blue was unreadable). */
.guide-btn--primary,
.guide-btn--primary:hover,
.guide-btn--primary:focus,
.guide-btn--primary:visited {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
  color: #ffffff !important;
  box-shadow: 0 4px 12px -2px rgba(30, 58, 138, 0.4);
}

.guide-btn--primary:hover {
  background: linear-gradient(135deg, #1e40af, #172554);
}

.guide-btn--secondary,
.guide-btn--secondary:hover,
.guide-btn--secondary:focus,
.guide-btn--secondary:visited {
  background: #f8fafc;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
}

.guide-btn--secondary:hover {
  background: #e2e8f0;
}

/* Empty state */
.guide-empty {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 2rem 1.25rem;
  text-align: center;
  box-shadow: var(--guide-shadow);
}

.guide-docs.guide-empty {
  margin-top: 1.125rem;
}

.guide-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  background: #eff6ff;
  font-size: 1.5rem;
}

.guide-empty__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.guide-empty__text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

/* Detail page */
.guide-detail {
  margin-top: 0;
}

.guide-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #be123c;
  text-decoration: none;
  transition: color 0.15s ease;
}

.guide-detail__back:hover {
  color: #9f1239;
}

.guide-detail__back svg {
  width: 1rem;
  height: 1rem;
}

.guide-detail__header {
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.guide-detail__title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--guide-text);
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .guide-detail__title {
    font-size: 2rem;
  }
}

.guide-detail__summary {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
}

.guide-detail__updated {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.guide-detail__content {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

.guide-detail__content h1,
.guide-detail__content h2,
.guide-detail__content h3 {
  color: #0f172a;
  font-weight: 800;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.guide-detail__content p {
  margin-bottom: 0.875rem;
}

.guide-detail__content ul,
.guide-detail__content ol {
  margin-bottom: 0.875rem;
  padding-left: 1.25rem;
}

.guide-detail__content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-detail__content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.guide-staff-edit {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
  text-decoration: none;
  flex-shrink: 0;
}

.guide-staff-edit:hover {
  background: #fef3c7;
}

.guide-detail__attachments {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

/* Mobile polish */
@media (max-width: 639px) {
  .guide-page #floating-nav {
    display: none !important;
  }

  .guide-attachment-card__actions {
    width: 100%;
  }

  .guide-attachment-card__actions .guide-btn {
    flex: 1;
  }
}
