/* ==========================================================================
   NEXTASOFT LLC — Enterprise Brand Styling System
   Primary Brand Color: #005148 (Deep Emerald Teal)
   Zero Yellow Policy | High-Conversion Modern UI
   Light & Dark Theme Engine with Instant Toggle
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --color-primary: #005148;
  --color-primary-hover: #006b5f;
  --color-primary-dark: #003832;
  --color-primary-darker: #002420;
  --color-accent-teal: #2dd4bf;
  --color-accent-mint: #a7f3d0;
  --color-accent-emerald: #10b981;
  --color-bg-dark: #071210;
  --color-bg-card-dark: #0b1a18;
  --color-bg-light: #f8fafc;
  --color-text-dark: #0f172a;
  --color-text-muted: #64748b;
  --color-border-subtle: #e2e8f0;
  --color-border-dark: #163832;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text-dark);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.025em;
}

/* Smooth Transitions for Theme Switch */
body, header, .header-glass, nav, .mobile-menu-drawer, .form-input, .card-hover-effect, footer, section, div, aside {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

/* Accessibility: High-Contrast Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease-in-out;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid #2dd4bf;
}

/* Focus Visible */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Custom Selection */
::selection {
  background-color: #005148;
  color: #ffffff;
}

/* ==========================================
   HEADER & GLASSMORPHISM (LIGHT & DARK)
   ========================================== */
.header-glass {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  transition: all 0.3s ease;
}

.header-scrolled {
  box-shadow: 0 4px 20px -2px rgba(0, 81, 72, 0.08);
}

html.dark .header-glass {
  background: rgba(7, 18, 16, 0.92);
  border-bottom: 1px solid rgba(22, 56, 50, 0.85);
}

html.dark .header-scrolled {
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   MOBILE NAVIGATION MODAL & DRAWER
   ========================================== */
#mobile-menu {
  transition: opacity 0.25s ease-in-out;
}
#mobile-menu.hidden {
  display: none !important;
}
#mobile-menu:not(.hidden) {
  display: flex !important;
}
.mobile-menu-drawer {
  animation: slideUpMobileMenu 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUpMobileMenu {
  from {
    transform: translateY(100%);
    opacity: 0.8;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

html.dark .mobile-menu-drawer {
  background-color: #0b1a18;
  border-top: 1px solid #163832;
  color: #f8fafc;
}

/* ==========================================
   THEME TOGGLE BUTTON COMPONENT
   ========================================== */
.theme-toggle-btn {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
}

.theme-toggle-btn:active {
  transform: translateY(0);
}

/* ==========================================
   HERO TECHNOLOGY MESH BACKGROUND
   ========================================== */
.hero-mesh-bg {
  background-color: #071210;
  background-image: 
    radial-gradient(at 10% 20%, rgba(0, 81, 72, 0.45) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(0, 120, 107, 0.3) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(45, 212, 191, 0.1) 0px, transparent 50%);
}

.dark-section-mesh {
  background-color: #06110f;
  background-image: radial-gradient(circle at 50% 0%, rgba(0, 81, 72, 0.25) 0%, transparent 60%);
}

/* ==========================================
   CARDS & HOVER EFFECTS (LIGHT & DARK)
   ========================================== */
.card-hover-effect {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.card-hover-effect:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0, 81, 72, 0.12);
  border-color: rgba(0, 81, 72, 0.4);
}

.dark-card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.dark-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(45, 212, 191, 0.15);
  border-color: #2dd4bf;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary {
  background-color: #005148;
  color: #ffffff;
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px 0 rgba(0, 81, 72, 0.25);
}

.btn-primary:hover {
  background-color: #00685d;
  box-shadow: 0 6px 20px 0 rgba(0, 81, 72, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: #005148;
  border: 1.5px solid #005148;
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: rgba(0, 81, 72, 0.05);
  border-color: #00685d;
  color: #00685d;
}

html.dark .btn-secondary {
  color: #2dd4bf;
  border-color: #2dd4bf;
}
html.dark .btn-secondary:hover {
  background-color: rgba(45, 212, 191, 0.1);
  border-color: #5eead4;
  color: #5eead4;
}

.btn-dark-secondary {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1.5px solid rgba(45, 212, 191, 0.4);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-dark-secondary:hover {
  background-color: rgba(45, 212, 191, 0.12);
  border-color: #2dd4bf;
  color: #2dd4bf;
}

/* ==========================================
   0% RISK BADGE COMPONENT
   ========================================== */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background-color: rgba(0, 81, 72, 0.1);
  border: 1px solid rgba(0, 81, 72, 0.25);
  color: #005148;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.risk-badge-dark {
  background-color: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: #2dd4bf;
}

/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #005148;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #003b34;
}

html.dark ::-webkit-scrollbar-track {
  background: #071210;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #163832;
  border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #2dd4bf;
}

/* ==========================================
   TIMELINE COMPONENTS
   ========================================== */
.timeline-step::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}

html.dark .timeline-step::before {
  background: #163832;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 1rem 1.5rem;
  background: #003832;
  color: #ffffff;
  border-left: 4px solid #2dd4bf;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================
   INTERACTIVE TABS
   ========================================== */
.tab-btn.active {
  background-color: #005148;
  color: #ffffff;
  border-color: #005148;
}

/* ==========================================
   FORM STYLES
   ========================================== */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.25s, color 0.25s;
}

.form-input:focus {
  outline: none;
  border-color: #005148;
  box-shadow: 0 0 0 3px rgba(0, 81, 72, 0.15);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.375rem;
}

/* ==========================================
   HERO TEMPLATE SLIDER STYLES
   ========================================== */
.hero-slide {
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide img {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
  transition: transform 0.35s ease;
}

#hero-template-slider:hover .hero-slide.active img {
  transform: scale(1.015);
}

.slider-dot {
  cursor: pointer;
}

/* ==========================================================================
   COMPLETE DARK THEME ADAPTATION OVERRIDES
   ========================================================================== */
html.dark {
  color-scheme: dark;
}

html.dark body {
  background-color: #071210;
  color: #f8fafc;
}

/* Dark theme background replacements */
html.dark .bg-white {
  background-color: #0b1a18 !important;
}

html.dark .bg-slate-50,
html.dark .bg-gray-50 {
  background-color: #050d0b !important;
}

html.dark .bg-slate-100,
html.dark .bg-gray-100 {
  background-color: #091715 !important;
}

/* Dark theme text replacements */
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-gray-900,
html.dark .text-gray-800 {
  color: #f8fafc !important;
}

html.dark .text-slate-700,
html.dark .text-slate-600,
html.dark .text-gray-700,
html.dark .text-gray-600 {
  color: #cbd5e1 !important;
}

html.dark .text-slate-500,
html.dark .text-slate-400,
html.dark .text-gray-500,
html.dark .text-gray-400 {
  color: #94a3b8 !important;
}

/* Dark theme borders */
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300,
html.dark .border-gray-100,
html.dark .border-gray-200 {
  border-color: #163832 !important;
}

/* Dark theme inputs */
html.dark .form-input,
html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark textarea,
html.dark select {
  background-color: #071210 !important;
  color: #f8fafc !important;
  border-color: #163832 !important;
}

html.dark .form-input:focus,
html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
  border-color: #2dd4bf !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2) !important;
}

html.dark .form-input::placeholder,
html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}

html.dark .form-label {
  color: #e2e8f0 !important;
}

/* Dark theme navigation links */
html.dark .nav-link {
  color: #cbd5e1 !important;
}
html.dark .nav-link:hover {
  color: #2dd4bf !important;
}

/* Dark theme filter buttons & accordions */
html.dark .project-filter-btn:not(.active),
html.dark .blog-filter-btn:not(.active) {
  background-color: #0b1a18 !important;
  color: #cbd5e1 !important;
  border-color: #163832 !important;
}

html.dark .faq-accordion-btn {
  background-color: #0b1a18 !important;
  color: #f8fafc !important;
}

html.dark .card-hover-effect:hover {
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.6), 0 0 16px rgba(45, 212, 191, 0.1) !important;
  border-color: rgba(45, 212, 191, 0.4) !important;
}

/* Dark theme footer */
html.dark footer {
  background-color: #040b0a !important;
  border-color: #163832 !important;
}

/* ==========================================================================
   LIGHT THEME ADAPTATION OVERRIDES
   ========================================================================== */
html.light {
  color-scheme: light;
}

html.light body {
  background-color: #ffffff;
  color: #0f172a;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
