/* ================================================================
   INDUSTRY SELECTOR — Overlay, Nav Toggle, CSS Personalizations
   ================================================================ */

/* ----------------------------------------------------------------
   1. OVERLAY BACKDROP
   ---------------------------------------------------------------- */
.vc-industry-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.vc-industry-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scroll when overlay is open */
body.vc-industry-open {
  overflow: hidden;
}

/* ----------------------------------------------------------------
   2. OVERLAY DIALOG
   ---------------------------------------------------------------- */
.vc-industry-dialog {
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
}

.vc-industry-dialog h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--vc-text-primary);
  margin: 0 0 var(--sp-2) 0;
}

.vc-industry-dialog .vc-industry-subtitle {
  color: var(--vc-text-secondary);
  font-size: 0.95rem;
  margin: 0 0 var(--sp-8) 0;
  line-height: 1.5;
}

/* ----------------------------------------------------------------
   3. INDUSTRY CARD GRID
   ---------------------------------------------------------------- */
.vc-industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.vc-industry-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-4);
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border-default);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform 200ms ease;
}

.vc-industry-option:hover {
  border-color: var(--vc-accent-border);
  background: var(--vc-bg-surface-2);
  transform: translateY(-2px);
}

.vc-industry-option:active {
  transform: translateY(0);
}

.vc-industry-option .vc-ind-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--vc-accent-subtle);
  color: var(--vc-accent);
}

.vc-industry-option .vc-ind-icon svg {
  width: 22px;
  height: 22px;
}

.vc-industry-option .vc-ind-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--vc-text-primary);
}

.vc-industry-option .vc-ind-tagline {
  font-size: 0.78rem;
  color: var(--vc-text-tertiary);
  line-height: 1.35;
}

/* Selection flash */
.vc-industry-option.vc-selected {
  border-color: var(--vc-accent);
  background: var(--vc-accent-subtle);
  box-shadow: var(--vc-shadow-accent);
}

/* ----------------------------------------------------------------
   4. SKIP LINK
   ---------------------------------------------------------------- */
.vc-industry-skip {
  display: inline-block;
  color: var(--vc-text-tertiary);
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: none;
  padding: var(--sp-2) var(--sp-4);
  transition: color var(--t-fast);
}

.vc-industry-skip:hover {
  color: var(--vc-text-secondary);
}

/* ----------------------------------------------------------------
   5. NAV TOGGLE (desktop pill)
   ---------------------------------------------------------------- */
.vc-industry-toggle {
  display: none !important; /* Hidden — inline prompt handles industry selection now */
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--vc-text-secondary);
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border-default);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  position: relative;
}

.vc-industry-toggle:hover {
  border-color: var(--vc-accent-border);
  color: var(--vc-text-primary);
}

.vc-industry-toggle .vc-toggle-chevron {
  width: 12px;
  height: 12px;
  transition: transform 200ms ease;
}

.vc-industry-toggle.open .vc-toggle-chevron {
  transform: rotate(180deg);
}

/* ----------------------------------------------------------------
   6. NAV DROPDOWN
   ---------------------------------------------------------------- */
.vc-industry-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border-default);
  border-radius: var(--r-md);
  box-shadow: var(--vc-shadow-md);
  padding: var(--sp-1) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 200ms ease, visibility 200ms ease, transform 200ms ease;
  z-index: 1000;
}

.vc-industry-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.vc-industry-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--sp-2) var(--sp-4);
  border: none;
  background: none;
  color: var(--vc-text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.vc-industry-dropdown button:hover {
  background: var(--vc-bg-surface-2);
  color: var(--vc-text-primary);
}

.vc-industry-dropdown button.vc-dd-active {
  color: var(--vc-accent);
  font-weight: 600;
}

.vc-industry-dropdown .vc-dd-separator {
  height: 1px;
  background: var(--vc-border-subtle);
  margin: var(--sp-1) 0;
}

/* ----------------------------------------------------------------
   7. FOOTER LINK
   ---------------------------------------------------------------- */
.vc-industry-footer-link {
  color: var(--vc-text-tertiary);
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color var(--t-fast);
}

.vc-industry-footer-link:hover {
  color: var(--vc-accent);
}

/* ----------------------------------------------------------------
   8. CSS-ONLY CONSEQUENCE CARD HIGHLIGHTING
   ---------------------------------------------------------------- */

/* Law — first card */
[data-vc-industry="legal"] .core-problem-card:nth-child(1) {
  border-color: var(--vc-accent-border);
  box-shadow: var(--vc-shadow-accent);
}
[data-vc-industry="legal"] .core-problem-card:not(:nth-child(1)) {
  opacity: 0.6;
}

/* Academia — second card */
[data-vc-industry="academic"] .core-problem-card:nth-child(2) {
  border-color: var(--vc-accent-border);
  box-shadow: var(--vc-shadow-accent);
}
[data-vc-industry="academic"] .core-problem-card:not(:nth-child(2)) {
  opacity: 0.6;
}

/* Finance — third card */
[data-vc-industry="financial"] .core-problem-card:nth-child(3) {
  border-color: var(--vc-accent-border);
  box-shadow: var(--vc-shadow-accent);
}
[data-vc-industry="financial"] .core-problem-card:not(:nth-child(3)) {
  opacity: 0.6;
}

/* Consulting — fourth card */
[data-vc-industry="consulting"] .core-problem-card:nth-child(4) {
  border-color: var(--vc-accent-border);
  box-shadow: var(--vc-shadow-accent);
}
[data-vc-industry="consulting"] .core-problem-card:not(:nth-child(4)) {
  opacity: 0.6;
}

/* Pharma has no matching card — all stay full opacity */

/* Industry card highlighting (JS adds .vc-highlighted) */
.industry-card.vc-highlighted {
  border-color: var(--vc-accent-border);
  box-shadow: var(--vc-shadow-accent);
  order: -1;
}

/* ----------------------------------------------------------------
   9. RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
  .vc-industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 5th card spans full width when we have 2 columns */
  .vc-industry-option:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 280px;
    justify-self: center;
  }

  .vc-industry-dialog {
    padding: var(--sp-8) var(--sp-4);
  }

  /* Hide desktop dropdown toggle on mobile */
  .vc-industry-toggle {
    display: none;
  }
}

@media (max-width: 480px) {
  .vc-industry-grid {
    grid-template-columns: 1fr;
  }

  .vc-industry-option:last-child:nth-child(odd) {
    max-width: none;
  }
}

/* --- Inline industry prompt (non-blocking) ------------------------------ */
.industry-prompt {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  background: var(--vc-bg-body);
}

.industry-prompt-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--vc-text-tertiary);
}

.industry-prompt-buttons {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: center;
}

.industry-prompt-btn {
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border-default);
  border-radius: var(--r-full);
  padding: 4px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--vc-text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}

.industry-prompt-btn:hover {
  border-color: var(--vc-accent-border);
  color: var(--vc-accent);
  background: var(--vc-accent-subtle);
  transform: translateY(-1px);
}

.industry-prompt-btn:active {
  transform: scale(0.97);
}

.industry-prompt-btn:focus-visible {
  outline: 2px solid var(--vc-accent);
  outline-offset: 2px;
}

.industry-prompt-suffix {
  color: var(--vc-text-tertiary);
}

.industry-prompt-link {
  background: none;
  border: none;
  color: var(--vc-accent);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.industry-prompt-link:hover {
  color: var(--vc-accent-hover);
}

.industry-prompt-link:focus-visible {
  outline: 2px solid var(--vc-accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Hide inline prompt when an industry is already selected */
[data-vc-industry] .industry-prompt {
  display: none;
}

@media (max-width: 768px) {
  .industry-prompt-inner {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .industry-prompt-text,
  .industry-prompt-suffix {
    font-size: 14px;
  }
}
