/* ==========================================================================
   PixDok Category Hub Design System (category-hub.css)
   Clean, modern, professional SaaS layout for all Tool Suites
   Supports 375px/390px mobile up to 1920px+ desktop
   ========================================================================== */

:root {
  --hub-max-width: 1240px;
  --hub-primary: #3b82f6;
  --hub-text-dark: #0f172a;
  --hub-text-main: #334155;
  --hub-text-muted: #64748b;
  --hub-border: #e2e8f0;
  --hub-bg-alt: #f8fafc;
}

/* Base resets & typography */
body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--hub-text-main);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.hub-container {
  width: 100%;
  max-width: var(--hub-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* Breadcrumbs Bar */
.hub-breadcrumbs-bar {
  background: #f8fafc;
  border-bottom: 1px solid var(--hub-border);
  padding: 0.65rem 0;
}
.hub-breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--hub-text-muted);
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.hub-breadcrumbs-list a {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.hub-breadcrumbs-list a:hover {
  color: var(--hub-text-dark);
}
.hub-breadcrumbs-list .sep {
  font-size: 0.62rem;
  color: #94a3b8;
}
.hub-breadcrumbs-list .current {
  color: var(--hub-text-dark);
  font-weight: 600;
}

/* Hero Section */
.hub-hero {
  padding: 2.75rem 0 2rem;
  border-bottom: 1px solid var(--hub-border);
}
.hub-hero.theme-blue-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 50%, #fdf4ff 100%);
  border-bottom-color: #dbeafe;
}
.hub-hero.theme-red-hero {
  background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 50%, #fff8f0 100%);
  border-bottom-color: #fee2e2;
}
.hub-hero.theme-purple-hero {
  background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 50%, #fdf2f8 100%);
  border-bottom-color: #e0e7ff;
}
.hub-hero.theme-green-hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 50%, #f7fee7 100%);
  border-bottom-color: #dcfce7;
}
.hub-hero.theme-indigo-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #f0fdfa 100%);
  border-bottom-color: #e0e7ff;
}

.hub-hero-inner {
  max-width: 820px;
}
.hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}
.hub-badge.badge-blue { background: #dbeafe; color: #2563eb; }
.hub-badge.badge-red { background: #fee2e2; color: #dc2626; }
.hub-badge.badge-purple { background: #ede9fe; color: #7c3aed; }
.hub-badge.badge-green { background: #dcfce7; color: #16a34a; }
.hub-badge.badge-indigo { background: #e0e7ff; color: #4f46e5; }

.hub-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--hub-text-dark);
  line-height: 1.22;
  letter-spacing: -0.025em;
  margin: 0 0 0.65rem 0;
}
.hub-hero-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* Body / Main Workspace */
.hub-body {
  padding: 2rem 0 5rem;
}

.hub-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 2rem 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hub-section-label:first-child {
  margin-top: 0;
}

/* Responsive Tool Grid: 2-column desktop, compact & balanced */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-bottom: 1rem;
}

/* Card Design */
.hub-card {
  background: #ffffff;
  border: 1px solid var(--hub-border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 4px rgba(15,23,42,0.03);
  position: relative;
  overflow: hidden;
}
.hub-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}
.hub-card:active {
  transform: scale(0.99);
}

.hub-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.hub-card:hover .hub-card-icon {
  transform: scale(1.05);
}

.hub-card-content {
  flex: 1;
  min-width: 0;
}
.hub-card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hub-text-dark);
  line-height: 1.25;
  margin: 0 0 0.25rem 0;
}
.hub-card-desc {
  font-size: 0.8rem;
  color: var(--hub-text-muted);
  line-height: 1.4;
  margin: 0;
  white-space: normal;
}
.hub-card-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.hub-card:hover .hub-card-arrow {
  background: var(--hub-text-dark);
  color: #ffffff;
  transform: translateX(2px);
}

/* Color Themes for Cards */
.theme-blue   .hub-card-icon { background: #eff6ff; color: #2563eb; }
.theme-red    .hub-card-icon { background: #fef2f2; color: #dc2626; }
.theme-green  .hub-card-icon { background: #f0fdf4; color: #16a34a; }
.theme-violet .hub-card-icon { background: #f5f3ff; color: #7c3aed; }
.theme-pink   .hub-card-icon { background: #fdf2f8; color: #db2777; }
.theme-amber  .hub-card-icon { background: #fffbeb; color: #d97706; }
.theme-teal   .hub-card-icon { background: #f0fdfa; color: #0d9488; }
.theme-indigo .hub-card-icon { background: #eef2ff; color: #4f46e5; }
.theme-slate  .hub-card-icon { background: #f1f5f9; color: #475569; }

/* Task Finder ("Which Tool Should I Use?") */
.hub-task-finder {
  margin-top: 3rem;
  background: #ffffff;
  border: 1px solid var(--hub-border);
  border-radius: 20px;
  padding: 1.75rem 2rem;
  box-shadow: 0 4px 16px rgba(15,23,42,0.03);
}
.hub-task-header {
  margin-bottom: 1.25rem;
}
.hub-task-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hub-primary);
  display: inline-block;
  margin-bottom: 0.3rem;
}
.hub-task-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--hub-text-dark);
  margin: 0 0 0.3rem;
  line-height: 1.25;
}
.hub-task-header p {
  font-size: 0.88rem;
  color: var(--hub-text-muted);
  margin: 0;
}
.hub-task-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.hub-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.hub-task-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.hub-task-intent {
  font-size: 0.8rem;
  color: var(--hub-text-muted);
  line-height: 1.3;
}
.hub-task-tool {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hub-text-dark);
}
.hub-task-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* FAQ Accordion Section */
.hub-faq-section {
  margin-top: 3rem;
}
.hub-faq-header {
  margin-bottom: 1.25rem;
}
.hub-faq-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--hub-text-dark);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}
.hub-faq-subtitle {
  font-size: 0.9rem;
  color: var(--hub-text-muted);
  margin: 0;
}
.hub-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.hub-faq-item {
  background: #ffffff;
  border: 1px solid var(--hub-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.hub-faq-item.active {
  border-color: #cbd5e1;
}
.hub-faq-question {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hub-text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.hub-faq-question:hover {
  background: #f8fafc;
}
.hub-faq-icon {
  font-size: 0.8rem;
  color: #94a3b8;
  transition: transform 0.25s ease;
}
.hub-faq-item.active .hub-faq-icon {
  transform: rotate(180deg);
}
.hub-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  padding: 0 1.25rem;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  background: #fafafa;
}
.hub-faq-item.active .hub-faq-answer {
  max-height: 400px;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid #f1f5f9;
}

/* Cross-Hub Navigation Strip */
.hub-suite-nav {
  margin-top: 3.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--hub-border);
}
.hub-suite-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 1rem;
}
.hub-suite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.hub-suite-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--hub-border);
  text-decoration: none;
  color: var(--hub-text-dark);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.hub-suite-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  transform: translateY(-1px);
}
.hub-suite-pill i {
  font-size: 1.05rem;
}

/* ==========================================================================
   Mobile Optimization (max-width: 640px)
   Matches PixDok's high-converting compact 2-column mobile experience
   ========================================================================== */
@media (max-width: 640px) {
  .hub-container {
    padding: 0 1rem;
  }
  .hub-hero {
    padding: 1.75rem 0 1.25rem;
  }
  .hub-hero h1 {
    font-size: 1.55rem;
  }
  .hub-hero-desc {
    font-size: 0.84rem;
  }
  .hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .hub-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.95rem 0.85rem;
    gap: 0.45rem;
    border-radius: 14px;
  }
  .hub-card-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 9px;
  }
  .hub-card-name {
    font-size: 0.82rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
  }
  .hub-card-desc {
    font-size: 0.68rem;
    line-height: 1.35;
    padding-bottom: 0.5rem;
  }
  .hub-card-arrow {
    position: absolute;
    bottom: 0.6rem;
    right: 0.65rem;
    width: 20px;
    height: 20px;
    font-size: 0.5rem;
  }
  .hub-task-finder {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    margin-top: 2rem;
  }
  .hub-task-grid {
    grid-template-columns: 1fr;
  }
  .hub-faq-section {
    margin-top: 2.25rem;
  }
  .hub-faq-question {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }
  .hub-faq-answer {
    padding: 0 1rem;
    font-size: 0.82rem;
  }
  .hub-faq-item.active .hub-faq-answer {
    padding: 0.75rem 1rem 1rem;
  }
}

/* Extra small mobile adjustments (375px & 390px) */
@media (max-width: 400px) {
  .hub-grid {
    gap: 0.5rem;
  }
  .hub-card {
    padding: 0.85rem 0.75rem;
  }
  .hub-card-name {
    font-size: 0.78rem;
  }
  .hub-card-desc {
    font-size: 0.64rem;
  }
}
