/* ================================
   COMPONENT STYLES
   ================================ */

/* Header & Navigation */
header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: var(--space-base) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

header .logo {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

header .tagline {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}

.tab-btn {
  padding: var(--space-base) var(--space-lg);
  border: none;
  background: none;
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary);
  background: var(--bg-light);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* Buttons */
.btn {
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-base);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--font-size-sm);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-base) var(--space-2xl);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  margin: -20px -20px var(--space-2xl) -20px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.hero h1 {
  color: white;
  margin-bottom: var(--space-base);
}

.hero .subheading {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-lg);
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: var(--space-base);
  justify-content: center;
  flex-wrap: wrap;
}

/* Cards */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-base);
  padding: var(--space-lg);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-base);
  margin-bottom: var(--space-base);
}

.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}

.card-body {
  flex: 1;
}

.card-title {
  font-weight: 600;
  color: var(--text-dark);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge-foundation {
  background: rgba(74, 144, 226, 0.1);
  color: var(--foundation);
}

.badge-intermediate {
  background: rgba(245, 166, 35, 0.1);
  color: var(--intermediate);
}

.badge-professional {
  background: rgba(39, 174, 96, 0.1);
  color: var(--professional);
}

.badge-community {
  background: rgba(155, 89, 182, 0.1);
  color: var(--community);
}

/* Product Card */
.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-base);
  padding: var(--space-lg);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.product-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  border-radius: var(--radius-base);
  margin-bottom: var(--space-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text-light);
  font-size: var(--font-size-base);
}

.product-badge-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.product-name {
  font-size: var(--font-size-xl);
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.product-url {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-base);
  word-break: break-all;
}

.product-description {
  flex: 1;
  margin-bottom: var(--space-base);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.product-meta {
  background: var(--bg-light);
  padding: var(--space-sm) var(--space-base);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-base);
  font-size: var(--font-size-xs);
}

.product-meta strong {
  color: var(--primary);
  display: block;
  margin-bottom: var(--space-xs);
}

/* Hero Section */
.section {
  margin: var(--space-2xl) 0;
}

.section-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-2xl);
  text-align: center;
}

/* Journey & Steps */
.journey-container {
  background: var(--bg-white);
  border-radius: var(--radius-base);
  padding: var(--space-2xl) var(--space-lg);
  margin: var(--space-lg) 0;
}

.journey-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.journey-header h2 {
  margin-bottom: var(--space-sm);
}

.journey-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.step-card {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
  border-left: 4px solid var(--primary);
  padding: var(--space-lg);
  border-radius: var(--radius-base);
  transition: var(--transition);
}

.step-card:hover {
  box-shadow: var(--shadow-base);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: bold;
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-base);
}

.step-title {
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-dark);
}

.step-action {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.step-duration {
  font-size: var(--font-size-xs);
  color: var(--text-light);
}

.step-product {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  margin-top: var(--space-sm);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: var(--space-lg) 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.4s ease;
}

/* Outcome Selector */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-base);
  margin-bottom: var(--space-2xl);
}

.outcome-btn {
  background: var(--bg-white);
  border: 2px solid var(--border);
  padding: var(--space-lg);
  border-radius: var(--radius-base);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-dark);
}

.outcome-btn:hover {
  border-color: var(--primary);
  background: rgba(31, 119, 210, 0.05);
}

.outcome-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Challenge Card */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-base);
  margin-bottom: var(--space-lg);
}

.challenge-card {
  background: var(--bg-light);
  border: 2px solid var(--border);
  padding: var(--space-lg);
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: var(--transition);
}

.challenge-card:hover {
  border-color: var(--primary);
  background: rgba(31, 119, 210, 0.05);
}

.challenge-card.selected {
  background: rgba(31, 119, 210, 0.1);
  border-color: var(--primary);
}

.challenge-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-dark);
}

.challenge-description {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Recommendation Section */
.recommendation {
  background: rgba(31, 119, 210, 0.05);
  padding: var(--space-lg);
  border-radius: var(--radius-base);
  border-left: 4px solid var(--primary);
  margin-top: var(--space-lg);
}

.recommendation h3 {
  color: var(--primary);
  margin-bottom: var(--space-base);
}

.recommendation-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-base);
  margin-top: var(--space-lg);
}

.recommendation-product {
  background: var(--bg-white);
  padding: var(--space-base);
  border-radius: var(--radius-sm);
  border: 1px solid #d0e8ff;
}

.recommendation-product h4 {
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.recommendation-product p {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0;
}

/* Chatbot */
.chatbot-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 99;
}

.chatbot-trigger:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.chatbot-trigger.hidden {
  display: none;
}

.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  height: 600px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  z-index: 100;
  animation: slideIn 0.3s ease;
}

.chatbot-window.hidden {
  display: none;
}

.chatbot-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  margin: 0;
  color: white;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}

.message {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-base);
}

.message.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 80%;
  padding: var(--space-sm) var(--space-base);
  border-radius: var(--radius-base);
  font-size: var(--font-size-sm);
}

.message.bot .message-bubble {
  background: var(--bg-light);
  color: var(--text-dark);
  border-radius: var(--radius-base);
}

.message.user .message-bubble {
  background: var(--primary);
  color: white;
}

.chatbot-input {
  border-top: 1px solid var(--border);
  padding: var(--space-base);
  display: flex;
  gap: var(--space-sm);
}

.chatbot-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-base);
  font-size: var(--font-size-sm);
  font-family: var(--font-primary);
}

.chatbot-input button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-base);
  cursor: pointer;
  transition: var(--transition);
}

.chatbot-input button:hover {
  background: var(--primary-dark);
}

/* Footer */
footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
  text-align: center;
}

footer p {
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: var(--space-2xl) var(--space-base) var(--space-lg);
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: var(--space-base) var(--space-sm);
    font-size: var(--font-size-sm);
  }

  .chatbot-window {
    width: calc(100% - 32px);
    height: 500px;
    bottom: 80px;
    right: 16px;
  }

  .product-card {
    margin-bottom: var(--space-lg);
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .outcome-grid {
    grid-template-columns: 1fr;
  }

  .challenge-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .chatbot-window {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }

  .chatbot-trigger {
    bottom: 16px;
    right: 16px;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .journey-container {
    padding: var(--space-lg) var(--space-base);
  }
}
