/* HubSpot Plan Calculator Styles */
.hubspot-plan-calculator {
  max-width: 1024px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #374151;
}

/* Step Management */
.calculator-step {
  display: none;
}

.calculator-step.active {
  display: block;
}

/* Container */
.calculator-container {
  padding: 1.5rem;
  background: white;
}

/* Text Styles */
.text-center {
  text-align: center;
}

.calculator-title {
  font-size: 2.25rem;
  font-weight: bold;
  color: #111827;
  margin-bottom: 1.5rem;
}

.calculator-subtitle {
  font-size: 1.25rem;
  color: #374151;
  margin-bottom: 1.5rem;
}

.intro-description {
  color: #6b7280;
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  background-color: #e5e7eb;
  border-radius: 9999px;
  height: 0.5rem;
  margin-bottom: 0.5rem;
}

.progress-fill {
  background-color: #30643e;
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.step-indicator {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-primary {
  background-color: #30643e;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #22543d;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #d1d5db;
}

.btn-expert {
  background-color: #2563eb;
  color: white;
}

.btn-expert:hover:not(:disabled) {
  background-color: #1d4ed8;
}

/* Button Groups */
.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

/* Hub Header Layout */
.hub-title-container {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

/* Icons */
.checkmark-icon,
.play-icon,
.chevron-left,
.chevron-right {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
}

.chevron-left {
  margin-right: 0.5rem;
}

.chevron-right {
  margin-left: 0.5rem;
  pointer-events: none;
}

.next-btn .next-text {
  pointer-events: none;
}

.btn svg {
  pointer-events: none;
}

.btn span {
  pointer-events: none;
}

/* Benefits Section */
.benefits-section {
  background-color: #f8fafc;
  border-radius: 0.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.benefits-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  text-align: center;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.benefit-item {
  text-align: center;
}

.benefit-icon {
  width: 3rem;
  height: 3rem;
  background-color: #30643e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.benefit-icon .checkmark-icon,
.benefit-icon .play-icon {
  color: white;
  width: 1.5rem;
  height: 1.5rem;
}

.benefit-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.benefit-description {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Step Content */
.step-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 2rem;
  margin-bottom: 2rem;
}

.step-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Question Styles */
.question-header {
  margin-bottom: 1.5rem;
}

.section-badge {
  display: inline-block;
  background-color: #f0fdf4;
  color: #30643e;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.question-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.question-description {
  color: #6b7280;
  line-height: 1.75;
  max-width: 42rem;
}

.question-description strong {
  color: #374151;
  font-weight: 600;
}

.question-description br {
  line-height: 1.5;
}

/* Read More Functionality */
.question-description-container {
  position: relative;
}

.question-description.collapsed {
  /* Primary approach: CSS line-clamp */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* Fallback for browsers without line-clamp support */
  max-height: 5.25rem; /* Approximately 3 lines at 1.75 line-height */
  line-height: 1.75;
}

/* Fallback for older browsers - use max-height only */
@supports not (-webkit-line-clamp: 3) {
  .question-description.collapsed {
    display: block;
    max-height: 5.25rem;
    overflow: hidden;
    position: relative;
  }

  /* Add fade effect for older browsers */
  .question-description.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5rem;
    background: linear-gradient(transparent, white);
    pointer-events: none;
  }
}

.question-description.expanded {
  display: block;
  max-height: none;
  overflow: visible;
}

.question-description.expanded::after {
  display: none;
}

.read-more-btn {
  background: none;
  border: none;
  color: #30643e;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  text-decoration: underline;
  transition: color 0.2s ease;
  display: block;
  width: auto;
}

.read-more-btn:hover {
  color: #22543d;
}

.read-more-btn:focus {
  outline: 2px solid #30643e;
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

/* Purpose Selection */
.purposes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .purposes-grid {
    grid-template-columns: 1fr;
  }
}

.purpose-option {
  display: flex;
  align-items: flex-start;
  text-align: left;
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

/* Ensure default styling when not selected regardless of focus/active */
.purpose-option:not(.selected) {
  background: white;
  border-color: #e5e7eb;
}
.purpose-option:not(.selected):focus,
.purpose-option:not(.selected):active,
.purpose-option:not(.selected):focus-visible {
  background: white;
  border-color: #e5e7eb;
}

.purpose-option:hover {
  border-color: #e5e7eb;
  background-color: white;
}

.purpose-option:active {
  border-color: #e5e7eb;
  background-color: white;
}

.purpose-option.selected {
  border-color: #30643e;
  background-color: #f0fdf4;
}

.purpose-checkbox {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  margin-right: 1rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.purpose-option.selected .purpose-checkbox {
  border-color: #30643e;
  background-color: #30643e;
}

.purpose-option.selected .purpose-checkbox .checkmark-icon {
  color: white;
  width: 1rem;
  height: 1rem;
}

.purpose-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.purpose-description {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Quiz Options */
.options-container {
  margin-bottom: 2rem;
}

.option-btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
  margin-bottom: 0.75rem;
}

/* Remove blue focus ring and pop/raise effect */
.purpose-option:focus,
.purpose-option:focus-visible,
.option-btn:focus,
.option-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.purpose-option:hover,
.purpose-option.selected,
.option-btn:hover,
.option-btn.selected {
  transform: none;
  box-shadow: none;
}

.option-btn:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.option-btn.selected {
  border-color: #30643e;
  background-color: #f0fdf4;
}

.option-radio {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-btn.selected .option-radio {
  border-color: #30643e;
  background-color: #30643e;
}

.option-btn.selected .option-radio .checkmark-icon {
  color: white;
  width: 0.75rem;
  height: 0.75rem;
}

.option-text {
  color: #111827;
}

/* Results */
.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.results-container {
  margin-bottom: 2rem;
}

.results-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 0 auto;
}

.results-grid.single-item .hub-card,
.results-grid.single-item .platform-card {
  max-width: 425px;
  flex-basis: 425px;
}

/* Hub Cards */
.hub-card,
.platform-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: none;
  overflow: hidden;
  margin-bottom: 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
}

@media (min-width: 769px) {
  .results-grid:not(.single-item) .hub-card,
  .results-grid:not(.single-item) .platform-card {
    flex-basis: calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

.hub-header,
.platform-header {
  background-color: #30643e;
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
  height: 280px;
  display: flex;
  flex-direction: column;
}

.hub-icon {
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  margin-bottom: 0;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  flex-shrink: 0;
}

.hub-icon-img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.hub-title,
.platform-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0;
  line-height: 1.2;
  flex: 1;
  color: white;
}

.hub-description,
.platform-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  min-height: 60px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-section {
  margin-bottom: 0.5rem;
  margin-top: auto;
}

.price-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.25rem;
}

.hub-price,
.platform-price {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.price-detail {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.hub-content,
.platform-content {
  padding: 1rem 1.5rem 1.5rem;
  background: white;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.features-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  margin-top: 0;
}

.hub-features,
.platform-features {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.4;
}

.feature-item .checkmark-icon {
  color: #10b981;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.hub-contact-btn,
.platform-contact-btn {
  width: 100%;
  background-color: #30643e;
  color: white;
  border: none;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}

.hub-contact-btn:hover,
.platform-contact-btn:hover {
  background-color: #22543d;
}

/* Free Hub */
.free-hub-card {
  text-align: center;
  padding: 2rem;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.5rem;
}

.free-hub-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #166534;
  margin-bottom: 0.5rem;
}

.free-hub-description {
  color: #15803d;
}

/* Next Steps */
.next-steps {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.next-steps-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.next-step-item {
  display: flex;
  align-items: flex-start;
}

.next-step-item .checkmark-icon {
  color: #10b981;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.next-step-title {
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.25rem;
}

.next-step-description {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Results Actions */
.results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Expert Contact */
.expert-contact {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.expert-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 0.75rem;
}

.expert-description {
  color: #1d4ed8;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) and (min-width: 481px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .calculator-container {
    padding: 1rem;
  }
  
  .calculator-title {
    font-size: 1.875rem;
  }
  
  .purposes-grid {
    grid-template-columns: 1fr;
  }
  
  .step-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .step-navigation .btn {
    width: 100%;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .button-group .btn {
    width: 100%;
  }
  
  .results-actions {
    flex-direction: column;
  }
  
  .results-actions .btn {
    width: 100%;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .calculator-title {
    font-size: 1.5rem;
  }
  
  .question-title {
    font-size: 1.25rem;
  }
  
  .benefits-section {
    padding: 1.5rem;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .step-content {
    padding: 1.5rem;
  }
}