/**
 * Page-specific styles
 * Explorer & Landing pages
 */

/* ============================================
   EXPLORER PAGE STYLES
   ============================================ */

/* Background with subtle grid pattern */
.explorer-body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Topbar */
.explorer-topbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}


/* Sidebar */
.explorer-sidebar {
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

@media (min-width: 768px) {
  .explorer-sidebar {
    width: 24rem;
    /* 384px */
    max-width: 24rem;
  }
}

/* Main graph area */
.explorer-main {
  flex: 1;
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
}

/* Mermaid graph container */
.mermaid-container {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mermaid graph overrides */
.mermaid {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Status card */
.status-card {
  background: var(--status-genuine-bg);
  border: 1px solid var(--status-genuine);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

/* Sidebar sections */
.sidebar-section {
  margin-bottom: var(--space-lg);
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-divider {
  flex: 1;
  height: 1px;
  background: var(--border-color-light);
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

/* Landing body */
.landing-body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Landing hero section */
.landing-hero {
  padding-top: 8rem;
  padding-bottom: 6rem;
  text-align: center;
}

/* Hero section (legacy) */
.hero-section {
  padding-top: 8rem;
  padding-bottom: 5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary-lightest);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* Hero search box */
.hero-search-wrapper {
  max-width: 42rem;
  margin: 0 auto var(--space-xl);
}

.hero-search-input {
  height: 4rem;
  padding-left: 4rem;
  padding-right: 4rem;
  font-size: 1.125rem;
  border-width: 2px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.hero-search-input:focus {
  box-shadow: var(--shadow-xl);
  transform: scale(1.01);
  transition: all var(--transition-base);
}

/* Quick actions */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

/* Categories grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-card {
  position: relative;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  overflow: hidden;
}

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

.category-card:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--category-color, var(--color-primary));
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.category-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  display: block;
}

.category-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.category-examples {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

.category-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.category-link svg {
  transition: transform var(--transition-base);
}

.category-card:hover .category-link svg {
  transform: translateX(4px);
}

/* Recent verifications grid */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .recent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .recent-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.recent-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  animation: fade-in-up var(--transition-slow);
  animation-fill-mode: both;
}

.recent-card:nth-child(1) {
  animation-delay: 0.1s;
}

.recent-card:nth-child(2) {
  animation-delay: 0.2s;
}

.recent-card:nth-child(3) {
  animation-delay: 0.3s;
}

.recent-card:nth-child(4) {
  animation-delay: 0.4s;
}

.recent-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* How it works section */
.how-it-works-section {
  background: linear-gradient(135deg, var(--color-primary-lightest) 0%, var(--bg-primary) 100%);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .step-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-number {
  width: 5rem;
  height: 5rem;
  background: var(--color-primary);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.step-number span {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.step-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.step-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Trust indicators section */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.trust-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.trust-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.trust-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-floating {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  z-index: var(--z-sticky);
}

.nav-container {
  max-width: 80rem;
  margin: 0 auto;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--text-primary);
  color: white;
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
}

.footer-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.footer-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-lg);
}

.footer-copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   VERIFICATION HERO ANIMATIONS
   ============================================ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.4s ease-out;
}

.verification-hero {
  transition: all 0.3s ease;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ============================================
   EXPLORER FOCUS STATES (ACCESSIBILITY)
   ============================================ */

/* Graph nodes styling */
.mermaid g.node {
  cursor: pointer;
}

/* Set Open Sans font for all text in Mermaid graph */
.mermaid text {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 14px !important;
}

/* Add extra padding to node labels */
.mermaid g.node .label {
  padding: 8px 12px !important;
}

.mermaid g.node:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
  border-radius: 8px;
}

/* Explorer search input */
#explorer-search-input:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Glass panel inputs */
.glass-panel input:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Interactive buttons in explorer */
.btn-icon:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* ============================================
   NODE SELECTED STATE
   ============================================ */

/* Selected node highlight with blue glow */
.mermaid g.node.node-selected {
  filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.5)) !important;
}

.mermaid g.node.node-selected rect,
.mermaid g.node.node-selected polygon,
.mermaid g.node.node-selected circle {
  stroke: #2563eb !important;
  stroke-width: 3px !important;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}