/**
 * Versantus Marketing Site Styles
 * Brand: Vivid Raspberry #F0146E, Gunmetal #20212C, Amethyst #A445B2
 * Typography: Outfit (headings), Open Sans (body)
 */

/* ===== Versantus Navigation ===== */
.versantus-nav {
  background: rgba(32, 33, 44, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.versantus-nav .nav-links a {
  color: rgba(255, 255, 255, 0.9);
}

.versantus-nav .nav-links a:hover {
  color: var(--versantus-raspberry, #F0146E);
}

.versantus-nav .btn-primary {
  background: var(--versantus-gradient, linear-gradient(45deg, #A445B2 0%, #F0146E 100%));
  border: none;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

/* Logo icon fallback */
.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--versantus-gradient, linear-gradient(45deg, #A445B2 0%, #F0146E 100%));
  color: white;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 1.5rem;
  border-radius: 8px;
}

/* ===== Versantus Hero ===== */
.versantus-hero {
  background: var(--versantus-gunmetal, #20212C);
  color: white;
  padding-top: 120px;
}

.versantus-hero h1 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 600;
  background: var(--versantus-gradient, linear-gradient(45deg, #A445B2 0%, #F0146E 100%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero badge */
.hero-badge {
  display: inline-block;
  background: var(--versantus-gradient, linear-gradient(45deg, #A445B2 0%, #F0146E 100%));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--font-body, 'Open Sans', sans-serif);
}

/* ===== Versantus Buttons ===== */
.versantus-btn-primary,
.versantus-nav .btn-primary {
  background: var(--versantus-gradient, linear-gradient(45deg, #A445B2 0%, #F0146E 100%));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-family: var(--font-body, 'Open Sans', sans-serif);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(240, 20, 110, 0.3);
}

.versantus-btn-primary:hover,
.versantus-nav .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240, 20, 110, 0.4);
}

.versantus-btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-family: var(--font-body, 'Open Sans', sans-serif);
  transition: all 0.3s ease;
}

.versantus-btn-secondary:hover {
  border-color: var(--versantus-raspberry, #F0146E);
  color: var(--versantus-raspberry, #F0146E);
}

/* Secondary button in dark sections (CTA, etc.) */
.section-dark .btn-secondary,
.versantus-cta .btn-secondary,
.cta-section .btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.section-dark .btn-secondary:hover,
.versantus-cta .btn-secondary:hover,
.cta-section .btn-secondary:hover {
  background: white;
  color: var(--versantus-gunmetal, #20212C);
  border-color: white;
}

/* ===== Demo Overlay Modal ===== */
.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 44, 0.9);
  backdrop-filter: blur(8px);
}

.demo-overlay-container {
  position: relative;
  width: 95vw;
  height: 90vh;
  max-width: 1400px;
  background: var(--versantus-gunmetal, #20212C);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.demo-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-overlay-header h3 {
  color: white;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0;
}

.demo-overlay-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.demo-overlay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.demo-overlay-btn:hover {
  background: var(--versantus-raspberry, #F0146E);
  color: white;
}

.demo-overlay-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-overlay-close:hover {
  background: #ef4444;
  color: white;
}

.demo-overlay-content {
  flex: 1;
  overflow: hidden;
}

.demo-overlay-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

/* Component Grid */
.component-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.component-category {
  background: var(--versantus-light);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.component-category h4 {
  color: var(--versantus-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.component-category h4 i {
  color: var(--versantus-accent);
}

.component-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.component-category li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
  color: #64748b;
}

.component-category li:last-child {
  border-bottom: none;
}

/* Demo Showcase - Legacy (keep for backwards compat) */
.demo-showcase {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.demo-browser {
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  position: sticky;
  top: 100px;
}

/* Demo Showcase Inline - New sticky nav layout */
.demo-section {
  padding-bottom: 0;
}

.demo-showcase-inline {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
  min-height: 100vh;
}

.demo-embed-container {
  position: relative;
}

.demo-browser-frame {
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.demo-embed-content {
  position: relative;
  background: white;
  height: calc(100vh - 180px);
  min-height: 600px;
}

.demo-inline-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Mobile fallback - show screenshot instead of iframe */
.demo-mobile-fallback {
  display: none;
}

.demo-mobile-fallback img {
  width: 100%;
  display: block;
}

/* Open in new window button */
.demo-open-new-window {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(32, 33, 44, 0.9);
  color: white;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.demo-open-new-window:hover {
  background: var(--versantus-raspberry, #F0146E);
  color: white;
  transform: translateY(-2px);
}

.demo-open-new-window i {
  font-size: 0.75rem;
}

/* Sticky navigation on right */
.demo-nav-sticky {
  position: sticky;
  top: 100px;
  padding: 1.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.demo-nav-sticky h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

/* Active state for demo nav links */
.demo-nav-link.active {
  background: var(--versantus-gradient, linear-gradient(45deg, #A445B2 0%, #F0146E 100%));
  color: white;
}

.demo-nav-link.active i {
  color: white;
}

.browser-header {
  background: #2d2d44;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
}

.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27c93f; }

.browser-url {
  flex: 1;
  background: #1a1a2e;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #888;
  font-size: 0.875rem;
}



.browser-content {
  position: relative;
  background: white;
  height: 600px;
}

.browser-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.browser-content img {
  width: 100%;
  display: block;
}

.demo-fallback-img {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.demo-pages {
  position: sticky;
  top: 100px;
}

.demo-pages h3 {
  color: white;
  margin-bottom: 0.75rem;
}

.demo-pages-intro {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.demo-page-grid {
  display: grid;
  gap: 0.75rem;
}

.demo-page-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  color: white;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.demo-page-item:hover {
  background: rgba(255,255,255,0.12);
}

.demo-page-item:focus {
  outline: 2px solid var(--versantus-raspberry, #F0146E);
  outline-offset: 2px;
}

.demo-page-item:focus:not(:focus-visible) {
  outline: none;
}

.demo-page-item:focus-visible {
  outline: 2px solid var(--versantus-raspberry, #F0146E);
  outline-offset: 2px;
}

.demo-page-item.active {
  background: rgba(240, 20, 110, 0.25);
  border: 1px solid rgba(240, 20, 110, 0.5);
}

.demo-page-item > i {
  width: 20px;
  text-align: center;
  color: var(--versantus-raspberry, #F0146E);
  flex-shrink: 0;
}

.demo-page-item.active > i {
  color: white;
}

.demo-page-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-page-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.demo-action-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.85rem;
}

.demo-action-open:hover {
  background: var(--versantus-raspberry, #F0146E);
  color: white;
}

.demo-action-open:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

.demo-action-open:focus:not(:focus-visible) {
  outline: none;
}

.demo-action-open:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.demo-section {
  padding-bottom: 4rem;
}

/* Featured Testimonial */
.testimonial-featured {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.testimonial-featured .testimonial-quote {
  position: relative;
  padding: 2rem;
}

.testimonial-featured .testimonial-quote i {
  font-size: 3rem;
  color: var(--versantus-accent);
  opacity: 0.3;
  position: absolute;
  top: 0;
  left: 0;
}

.testimonial-featured .testimonial-quote p {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--versantus-primary);
  font-style: italic;
}

.testimonial-featured .testimonial-author {
  justify-content: center;
  margin-top: 2rem;
}

.testimonial-featured .testimonial-author img {
  width: 64px;
  height: 64px;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--versantus-primary) 0%, var(--versantus-secondary) 100%);
  color: white;
}

.versantus-cta {
  background: var(--versantus-gunmetal, #20212C);
}

.versantus-cta h2 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 600;
}

/* Versantus Footer */
.versantus-footer {
  background: var(--versantus-eggplant, #310B37);
  color: white;
}

.versantus-footer h4 {
  color: var(--versantus-raspberry, #F0146E);
  font-family: var(--font-heading, 'Outfit', sans-serif);
}

.versantus-footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.versantus-footer a:hover {
  color: var(--versantus-raspberry, #F0146E);
}

.footer-logo-img {
  height: 32px;
  width: auto;
  margin-bottom: 1rem;
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

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

/* Responsive */
@media (max-width: 992px) {
  .component-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .demo-showcase {
    grid-template-columns: 1fr;
  }

  .demo-pages {
    position: relative;
    top: 0;
  }

  .demo-browser {
    position: relative;
    top: 0;
  }

  /* Demo inline - switch to stacked layout on tablet */
  .demo-showcase-inline {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .demo-nav-sticky {
    position: relative;
    top: 0;
    max-height: none;
    order: -1; /* Put nav above the demo on mobile */
    margin-bottom: 1.5rem;
  }

  .demo-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hide iframe, show screenshot on mobile/tablet */
  .demo-inline-iframe {
    display: none;
  }

  .demo-mobile-fallback {
    display: block;
  }

  /* Homepage demo preview - hide iframe on mobile */
  .browser-content iframe {
    display: none;
  }

  .demo-fallback-img {
    display: block !important;
    position: relative;
  }

  .browser-content {
    height: auto;
  }

  .demo-embed-content {
    height: auto;
    min-height: auto;
  }

  .demo-open-new-window {
    display: none;
  }

  /* Make demo nav links trigger overlay on mobile */
  .demo-nav-link {
    /* Will be handled by JS - these become overlay triggers on mobile */
  }
}

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

  .demo-page-grid {
    grid-template-columns: 1fr;
  }

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

  .testimonial-featured .testimonial-quote p {
    font-size: 1.125rem;
  }

  /* Demo overlay responsive */
  .demo-overlay-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .demo-overlay-header h3 {
    font-size: 1rem;
  }

  /* Navigation responsive */
  .nav-logo-img {
    height: 28px;
  }

  .versantus-hero h1 {
    font-size: 1.75rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .demo-page-item {
    padding: 0.625rem 0.75rem;
  }

  .demo-page-name {
    font-size: 0.85rem;
  }

  .demo-action-open {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

