/* ==========================================================================
   Page — PDF Tools Hub (/PdfTools)
   ========================================================================== */

.pdf-hub {
  --pdf-hub-accent: #dc2626;
  --pdf-hub-accent-soft: rgb(220 38 38 / 0.08);
  --pdf-hub-accent-border: rgb(220 38 38 / 0.18);
}

.pdf-hub__hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-10), 10vw, var(--space-16));
  background:
    radial-gradient(ellipse 80% 60% at 15% 0%, rgb(var(--color-primary-rgb) / 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 20%, var(--pdf-hub-accent-soft), transparent 50%),
    linear-gradient(180deg, var(--color-primary-soft) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.pdf-hub__hero-inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  text-align: center;
  margin-inline: auto;
}

.pdf-hub__hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-bg-elevated);
  border: 1px solid var(--pdf-hub-accent-border);
  color: var(--pdf-hub-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-sm);
}

.pdf-hub__title {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
}

.pdf-hub__subtitle {
  margin: 0 0 var(--space-6);
  font-size: clamp(1rem, 2.2vw, var(--font-size-lg));
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

.pdf-hub__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdf-hub__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: rgb(var(--color-primary-rgb) / 0.08);
  border: 1px solid rgb(var(--color-primary-rgb) / 0.12);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.pdf-hub__pill .bi {
  color: var(--color-primary);
}

.pdf-hub__hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
}

.pdf-hub__doc {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 5.5rem;
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  font-size: 2rem;
  color: var(--pdf-hub-accent);
  transform: rotate(-8deg);
}

.pdf-hub__doc--1 {
  top: 18%;
  inset-inline-start: 8%;
}

.pdf-hub__doc--2 {
  top: 28%;
  inset-inline-end: 10%;
  color: var(--color-primary);
  transform: rotate(12deg);
}

.pdf-hub__doc--3 {
  bottom: 12%;
  inset-inline-start: 18%;
  color: var(--color-text-muted);
  transform: rotate(-4deg);
}

.pdf-hub__body {
  padding-block: var(--space-10);
}

.pdf-hub__section + .pdf-hub__section {
  margin-top: var(--space-12);
}

.pdf-hub__section-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.pdf-hub__section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  background: var(--pdf-hub-accent-soft);
  color: var(--pdf-hub-accent);
  font-size: 1.4rem;
  line-height: 1;
}

.pdf-hub__section-title {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.pdf-hub__section-desc {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

.pdf-hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.pdf-hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 100%;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.pdf-hub-card:hover {
  border-color: var(--pdf-hub-accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: inherit;
}

.pdf-hub-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.pdf-hub-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: var(--color-bg-muted);
  color: var(--pdf-hub-accent);
  font-size: 1.35rem;
  line-height: 1;
}

.pdf-hub-card__icon-image {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.pdf-hub-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1 1 auto;
}

.pdf-hub-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.pdf-hub-card__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.pdf-hub-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.pdf-hub-card__badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgb(34 197 94 / 0.1);
  color: #15803d;
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
}

.pdf-hub-card__arrow {
  color: var(--color-text-subtle);
  font-size: var(--font-size-sm);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.pdf-hub-card:hover .pdf-hub-card__arrow {
  color: var(--pdf-hub-accent);
  transform: translateX(-3px);
}

.pdf-hub__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-top: var(--space-12);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-bg-elevated));
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
}

.pdf-hub__cta-title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.pdf-hub__cta-desc {
  margin: 0;
  max-width: 36rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

.pdf-hub__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (max-width: 991.98px) {
  .pdf-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdf-hub__doc {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .pdf-hub__grid {
    grid-template-columns: 1fr;
  }

  .pdf-hub__cta-actions {
    width: 100%;
  }

  .pdf-hub__cta-actions .btn--primary,
  .pdf-hub__cta-actions .btn--ghost {
    flex: 1 1 auto;
    justify-content: center;
  }
}
