/* ============================================
   OmniSEO Enterprise V3 Theme
   Dark Glass + Overlapping Product Dashboard
   ============================================ */

:root {
  --color-primary: #6366f1;
  --color-secondary: #8b5cf6;
  --color-accent: #06b6d4;
  --color-dark-950: #030712;
  --color-dark-900: #0a0a0f;
  
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Smooth Scroll */
html { scroll-behavior: smooth; }

/* ============================================
   Glass Panel & Cards
   ============================================ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.metric-card-dark {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card-dark:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3); /* Primary color */
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Text Gradients
   ============================================ */
.gradient-text-large {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-flow {
  background: linear-gradient(90deg, #2563eb, #0ea5e9, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: textFlow 3s linear infinite;
}

@keyframes textFlow {
  to { background-position: 200% center; }
}

/* ============================================
   Animations
   ============================================ */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
  animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-fade-in {
  opacity: 0;
  animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-gradient-flow {
  background-size: 200% 200%;
  animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================
   Logo Marquee - Centered Active with Scrolling
   ============================================ */
.logo-marquee {
  width: 100%;
  margin-bottom: 4rem;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, transparent 100%);
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem 0;
}

.logo-item {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  opacity: 0.3;
  filter: grayscale(100%) brightness(1.5);
  transition: all 0.5s ease;
  padding: 0.875rem;
  border: 2px solid transparent;
  border-radius: 0.875rem;
}

.logo-item.active {
  opacity: 1;
  filter: grayscale(0%) brightness(1);
  transform: scale(1.15);
  border: 2px solid rgba(209, 213, 219, 0.5);
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   Rotating Text Animation
   ============================================ */
.rotating-text {
  display: inline-block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.rotating-text.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.rotating-text.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Chart Bars
   ============================================ */
.bar-fill {
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-chart-fill {
  transition: height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Floating Orbs (V2 Style)
   ============================================ */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
  pointer-events: none;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: float 10s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  bottom: 0;
  right: -100px;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(50px, 50px); }
}

/* ============================================
   Logo Ticker Animation
   ============================================ */
.logo-ticker {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.8) 6%, rgba(255,255,255,0.8) 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.8) 6%, rgba(255,255,255,0.8) 94%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  position: relative;
  flex-shrink: 0;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   LLM Constellation
   ============================================ */
#engine-name {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.engine-active {
  transform: scale(1.3) !important;
  opacity: 1 !important;
}

[data-engine] {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ============================================
   Feature Tabs
   ============================================ */
.feature-tab {
  cursor: pointer;
  padding-left: 1.5rem;
}

.feature-tab h3 {
  transition: color 0.3s ease;
}

.feature-tab p {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, color 0.3s ease;
  padding-right: 1rem;
}

#feature-image {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ============================================
   Sub-tabs (within AI Visibility Dashboard)
   ============================================ */
.sub-tab-button {
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.sub-tab-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.sub-tab-button.active {
  color: white;
  border-bottom-color: var(--color-primary);
}

.sub-tab-panel {
  min-height: 60px;
  transition: opacity 0.3s ease;
}

.sub-tab-panel.hidden {
  display: none;
}

@media (max-width: 640px) {
  .sub-tab-button {
    font-size: 0.75rem;
    padding: 0.5rem 0.625rem;
  }
}

/* ============================================
   Prompt Tracking Dashboard
   ============================================ */
.prompt-dashboard {
  min-height: 400px;
  border-radius: 0.5rem;
}

.competitor-dashboard {
  border-radius: 0.5rem;
}

.actionable-dashboard {
  border-radius: 0.5rem;
}

.citation-dashboard {
  border-radius: 0.5rem;
}

.prompt-dashboard table {
  border-collapse: separate;
  border-spacing: 0;
}

.prompt-dashboard th {
  white-space: nowrap;
}

.prompt-dashboard td {
  white-space: nowrap;
}

.prompt-dashboard td:first-child {
  white-space: normal;
  min-width: 200px;
  max-width: 250px;
}

.prompt-row {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.prompt-progress-bar {
  transition: width 1.5s ease-out;
}

/* ============================================
   Competitor Analysis Dashboard
   ============================================ */
.competitor-dashboard {
  min-height: 400px;
}

.competitor-row {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.competitor-bar {
  transition: width 1s ease-out;
}

.competitor-row .absolute {
  left: 0;
  right: 0;
}

/* ============================================
   Actionable Insights Dashboard
   ============================================ */
.actionable-dashboard {
  min-height: 400px;
}

.insight-metric {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.insight-row {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* ============================================
   Citation Tracking Dashboard
   ============================================ */
.citation-dashboard {
  min-height: 400px;
}

.citation-item {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.citation-domain {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* ============================================
   Dashboard Hover Overlay
   ============================================ */
.group:hover .dashboard-overlay {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-overlay {
  cursor: pointer;
}

.dashboard-overlay a {
  pointer-events: auto;
  cursor: pointer;
}

/* Ensure overlay works even when parent has pointer-events: none */
.group:hover .dashboard-overlay {
  pointer-events: auto;
}

/* Make sure overlay is clickable when visible */
.dashboard-overlay:hover {
  pointer-events: auto;
}

/* Mobile tap-to-toggle overlay */
.overlay-active .dashboard-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   Hide duplicate navigation from shared-nav.js
   ============================================ */
header.sticky,
header:not(nav) {
  display: none !important;
}

/* ============================================
   Mega Navigation Styles
   ============================================ */
.mega-nav-item {
  display: block;
  padding: 6px 0;
  transition: all 0.2s ease;
}

.mega-nav-item:hover {
  transform: translateX(4px);
}

/* Mega nav dropdown positioning — centered within the nav container */
.mega-nav-dropdown,
#platform-nav-dropdown,
#solutions-nav-dropdown,
#features-nav-dropdown,
#resources-nav-dropdown {
  z-index: 1000;
  width: 780px;
  max-width: calc(100% - 2rem);
  /* Center within the positioned flex container (no-padding parent) */
  left: 50%;
  transform: translateX(-50%);
}

/* Mini Dashboard Styles */
.mini-dashboard {
  animation: fadeIn 0.5s ease-out;
}

.mini-bar-fill {
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mini-counter {
  display: inline-block;
}

/* Prevent accidental closes - add small delay */
.mega-nav-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

/* Trigger divs — no longer position: relative; dropdowns position against the nav container */
#platform-nav-trigger,
#resources-nav-trigger {
  position: static;
}

/* Body scroll lock when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

/* Mobile menu styles */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

#mobile-menu.open {
  max-height: min(90vh, 2000px);
  opacity: 1;
  overflow: hidden;
  display: block;
}

#mobile-menu .mobile-menu-inner {
  max-height: min(90vh, 2000px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile accordion */
.mobile-accordion-trigger[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.mobile-accordion-panel {
  max-height: 0;
  transition: max-height 0.2s ease-out;
}

.mobile-accordion-panel.open {
  max-height: 500px;
}

/* Responsive adjustments — dropdown always centered via CSS;
   no special override needed at any breakpoint */

/* ============================================
   Hero Dashboard Container
   ============================================ */
#hero-dashboard-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  vertical-align: middle;
}

#hero-dashboard-container img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   Learn Card Arrow Animation
   ============================================ */
.group:hover .arrow-slide {
  transform: translateX(4px);
}

.arrow-slide {
  transition: transform 0.2s ease;
}

/* ============================================
   Case Study Cards
   ============================================ */
.case-study-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Dark Themed Scrollbar
   ============================================ */
.scrollbar-dark {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.scrollbar-dark::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.scrollbar-dark::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.scrollbar-dark::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.scrollbar-dark::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}
