/* ============================================
   HUB PAGE STYLES - ISOLATED & SCOPED
   This CSS overrides global styles for hub/index.php
   ============================================ */

/* Reset global section styles for hub page */
.hub-page section {
  padding: 0 !important;
  margin: 0;
}

/* Dashboard Container */
.hub-page .dashboard-container {
  padding-bottom: 4rem;
}

/* Hero Welcome */
.hub-page .hero-welcome {
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid var(--border-primary);
  text-align: center;
}

.hub-page .hero-welcome h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-heading), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-page .hero-welcome p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Horizontal Scrolling Section */
.hub-page .horizontal-section {
  margin-bottom: 2.5rem;
}

/* CRITICAL: Override landingpage.css section-header */
.hub-page .section-header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 1rem !important;
  padding: 0 0.5rem;
  text-align: left !important;
}

.hub-page .section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hub-page .view-all {
  font-size: 0.85rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.hub-page .horizontal-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0.5rem 1.5rem 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.hub-page .horizontal-scroll::-webkit-scrollbar {
  height: 6px;
}

.hub-page .horizontal-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.hub-page .horizontal-scroll::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 10px;
}

.hub-page .scroll-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.hub-page .scroll-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px var(--shadow-color);
  border-color: var(--accent-primary);
}

/* Tool Cards */
.hub-page .tool-card-mini {
  background: linear-gradient(145deg, var(--bg-secondary), var(--element-bg));
}

.hub-page .tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.hub-page .tool-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-heading);
}

.hub-page .tool-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Service Cards */
.hub-page .service-card-mini {
  background: transparent;
}

.hub-page .service-card-mini .price {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* Content Cards */
.hub-page .content-card-mini img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

/* AI Cards */
.hub-page .ai-card {
  background: linear-gradient(135deg, #1e1e2e, #2d2b55);
  border: 1px solid #4ade80;
  color: white;
}

.hub-page .ai-card .tool-title {
  color: #4ade80;
}

.hub-page .ai-card .tool-desc {
  color: rgba(255, 255, 255, 0.7);
}

/* Prompts Grid */
.hub-page .prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.hub-page .prompt-card {
  background: var(--element-bg);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  cursor: pointer;
}

.hub-page .prompt-card:hover {
  background: var(--bg-secondary);
}

.hub-page .prompt-text {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.hub-page .prompt-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hub-page {
    padding: 0 !important;
    margin: 0 !important;
  }

  .hub-page .dashboard-container {
    padding: 0 0.25rem 4rem 0.25rem;
  }

  .hub-page .scroll-card {
    flex: 0 0 240px;
  }

  .hub-page .section-header {
    flex-direction: row !important;
    padding: 0;
  }

  .hub-page .hero-welcome {
    border-radius: 12px;
    padding: 1.25rem;
    margin: 0 0 1.5rem 0;
  }

  .hub-page .horizontal-scroll {
    padding: 0.25rem 0 1rem 0;
  }
}
