/*
Theme Name: Decodya
Theme URI: https://decodya.com
Author: Decodya Engineering
Author URI: https://decodya.com
Description: High-performance, obsidian-cybernetic WordPress theme engineered for digital agencies, technical consultancies, and growth platforms. Built with Tailwind CSS, Geist, and JetBrains Mono.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: decodya
Tags: dark-mode, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready
*/

:root {
  --color-surface-lowest: #06080d;
  --color-surface: #080c14;
  --color-surface-dim: #0f131c;
  --color-surface-subtle: #0e131f;
  --color-surface-container: #1c2028;
  --color-surface-elevated: #141a27;
  --color-surface-bright: #353942;
  --color-line: #1e2638;
  --color-line-subtle: rgba(255, 255, 255, 0.06);
  --color-primary: #10b981;
  --color-primary-tint: #34d399;
  --color-primary-glow: rgba(16, 185, 129, 0.35);
  --color-secondary: #38bdf8;
  --color-secondary-tint: #7bd0ff;
  --color-secondary-glow: rgba(56, 189, 248, 0.25);
  --color-on-surface: #f1f5f9;
  --color-on-surface-muted: #94a3b8;
  --color-on-surface-dim: #64748b;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   1. CRITICAL LOGO FIXES (Strict bounds for WP custom logos)
   ========================================================================== */
.site-logo,
.custom-logo-link {
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
  max-height: 32px !important;
  max-width: 220px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.site-logo img,
.custom-logo-link img,
img.custom-logo,
header .site-logo img {
  height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
  display: block !important;
  vertical-align: middle !important;
}

/* ==========================================================================
   2. DESKTOP & SUB-MENU DROPDOWN FIXES
   ========================================================================== */
.decodya-nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.decodya-nav-item {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.decodya-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  color: var(--color-on-surface-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
}

.decodya-nav-link:hover,
.decodya-nav-item.current-menu-item > .decodya-nav-link,
.decodya-nav-item.current-menu-ancestor > .decodya-nav-link {
  color: var(--color-on-surface);
}

.decodya-nav-item.current-menu-item > .decodya-nav-link {
  color: var(--color-primary);
}

/* Dropdown Sub-menu */
.decodya-sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 220px;
  background-color: rgba(6, 8, 13, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-line);
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
  list-style: none;
}

.decodya-nav-item:hover > .decodya-sub-menu,
.decodya-nav-item:focus-within > .decodya-sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.decodya-sub-menu .decodya-sub-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-on-surface-muted);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  border-radius: 0.375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.decodya-sub-menu .decodya-sub-link:hover {
  background-color: rgba(30, 41, 59, 0.6);
  color: var(--color-primary);
  transform: translateX(3px);
}

/* Nested Sub-menus */
.decodya-sub-menu .decodya-nav-item {
  position: relative;
}
.decodya-sub-menu .decodya-sub-menu {
  top: 0;
  left: 100%;
  margin-top: 0;
  margin-left: 0.25rem;
}

/* ==========================================================================
   3. ANIMATIONS & CYBERNETIC VISUAL EFFECTS
   ========================================================================== */

/* Shimmering Text Gradient */
.animate-gradient-text {
  background: linear-gradient(135deg, #f8fafc 0%, #4edea3 40%, #7bd0ff 70%, #f8fafc 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 6s linear infinite;
}

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

/* Floating Ambient Glow */
@keyframes ambient-float {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(-50%, -45%) scale(1.15);
    opacity: 0.7;
  }
}

.animate-ambient-glow {
  animation: ambient-float 8s ease-in-out infinite;
}

/* Radar Ping */
@keyframes radar-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 0.2; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.animate-radar {
  animation: radar-pulse 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Card Hover Lift & Border Glow */
.cyber-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.cyber-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7), 0 0 20px -5px rgba(56, 189, 248, 0.2);
}

.cyber-card-emerald:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7), 0 0 24px -4px rgba(16, 185, 129, 0.3);
}

/* Scroll Reveal States */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Header Scrolled State */
header.header-scrolled {
  background-color: rgba(6, 8, 13, 0.95) !important;
  border-bottom-color: rgba(56, 189, 248, 0.15) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface-lowest);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Selection */
::selection {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

/* Admin bar offset fix */
.admin-bar header.fixed {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar header.fixed {
    top: 46px;
  }
}

/* Standard WP Classes */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--color-on-surface-dim); margin-top: 0.5rem; }
.sticky { position: sticky; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
