/* Custom CSS for AIMatrix Corporate Website */

/* Global Styles - Dark Theme */
:root {
  --hx-background: #000000;
  --hx-background-secondary: #0a0a0a;
  --hx-text-primary: #ffffff;
  --hx-text-secondary: #e0e0e0;
  --hx-text-tertiary: #b0b0b0;
  --hx-border: #1a1a1a;
  --hx-link: #60a5fa;
  --hx-link-hover: #93bbfc;
  --hx-accent: #00ff00;
}

/* Force black background and white text */
html {
  background: #000000 !important;
}

body {
  background: #000000 !important;
  color: #ffffff !important;
  position: relative !important;
  min-height: 100vh !important;
}

/* Digital Rain Canvas - Behind content */
#digital-rain-canvas {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  pointer-events: none !important;
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
}

/* Main content area - Semi-transparent background */
.hx-content,
.content,
main {
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(8px);
  color: #ffffff !important;
  position: relative !important;
  z-index: 2 !important;
  padding: 40px 20px;
  border-radius: 8px;
}

/* Article content */
article,
.article-content {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(5px);
  color: #ffffff !important;
  position: relative !important;
  z-index: 2 !important;
  padding: 20px;
  border-radius: 8px;
}

/* Text readability with shadow */
p, h1, h2, h3, h4, h5, h6, span, a, li, td, th, div {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9),
               0 0 5px rgba(0, 0, 0, 0.8) !important;
}

/* Navigation bar - transparent with blur */
.hx-navbar,
nav {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 255, 0, 0.2) !important;
  z-index: 100 !important;
  position: relative !important;
}

/* Logo Styling */
.logo-container {
  display: inline-block;
  position: relative;
}

.aimatrix-logo,
.navbar-logo-img {
  max-height: 40px !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
  filter: brightness(1.2);
  transition: all 0.3s ease;
}

.aimatrix-logo:hover,
.navbar-logo-img:hover {
  filter: brightness(1.4) drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
  transform: scale(1.05);
}

/* Homepage hero logo */
.hero-logo {
  max-width: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 2rem auto;
  display: block;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.7));
  }
}

/* Ensure navbar logo maintains aspect ratio */
nav img,
.navbar img,
.hx-navbar img {
  max-height: 40px !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Links */
a {
  color: #60a5fa !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #93bbfc !important;
}

/* Buttons */
.btn,
button,
.hx-btn {
  background: rgba(0, 255, 0, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(0, 255, 0, 0.3) !important;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:hover,
button:hover,
.hx-btn:hover {
  background: rgba(0, 255, 0, 0.2) !important;
  border-color: rgba(0, 255, 0, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 0, 0.2);
}

/* Cards */
.card,
.hx-card,
.feature-card {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 0, 0.2) !important;
  border-radius: 8px;
  padding: 24px;
  color: #ffffff !important;
  transition: all 0.3s ease;
}

.card:hover,
.hx-card:hover,
.feature-card:hover {
  background: rgba(0, 0, 0, 0.7) !important;
  border-color: rgba(0, 255, 0, 0.4) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 255, 0, 0.1);
}

/* Hero Section */
.hero-section {
  padding: 100px 0;
  text-align: center;
  position: relative;
  z-index: 10;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #00ff00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #b0b0b0;
  margin-bottom: 2rem;
}

/* Footer */
footer {
  background: #000000 !important;
  border-top: 1px solid rgba(0, 255, 0, 0.2) !important;
  color: #b0b0b0 !important;
  padding: 40px 0 !important;
  margin-top: 80px;
  text-align: center;
}

footer p {
  color: #888 !important;
  font-size: 0.9em !important;
  margin: 0.5rem 0 !important;
}

footer a {
  color: #60a5fa !important;
}

footer a:hover {
  color: #93bbfc !important;
}

/* Hide Hextra branding */
[href*="hextra"],
.powered-by,
*:contains("Hextra"),
*:contains("Powered by") {
  display: none !important;
}

/* Override Hextra theme variables */
[data-theme="light"],
[data-theme="dark"],
.dark,
.light {
  --hx-body-bg: #000000 !important;
  --hx-body-color: #ffffff !important;
  --hx-primary-bg: #000000 !important;
  --hx-secondary-bg: #0a0a0a !important;
}

/* Remove all default backgrounds */
.hx-bg-white,
.bg-white,
.hx-bg-gray-100,
.bg-gray-100,
.hx-bg-gray-50,
.bg-gray-50,
[class*="bg-"] {
  background: transparent !important;
}

/* Code blocks */
pre {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 255, 0, 0.2) !important;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
}

code {
  background: rgba(0, 0, 0, 0.6) !important;
  color: #00ff00 !important;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}

pre code {
  background: transparent !important;
  padding: 0;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid rgba(0, 255, 0, 0.2) !important;
}

th {
  background: rgba(0, 255, 0, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(0, 255, 0, 0.2) !important;
  padding: 12px;
}

td {
  border: 1px solid rgba(0, 255, 0, 0.2) !important;
  color: #e0e0e0 !important;
  padding: 12px;
}

tr:hover {
  background: rgba(0, 255, 0, 0.05) !important;
}

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

  .hero-subtitle {
    font-size: 1.2rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .mobile-menu {
    background: #000000 !important;
  }
}

/* Global image aspect ratio preservation */
img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Section spacing */
section {
  padding: 60px 0;
  position: relative;
  z-index: 2;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hide scroll-to-top button (glowing white box issue) */
#backToTop,
.hx-back-to-top,
.back-to-top,
[aria-label="Back to top"],
button[onclick*="scroll"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
