/* DohShield Enterprise Theme - Shared Stylesheet */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Enterprise Color Palette */
  --navy-primary: #0a1f44;
  --slate-secondary: #475569;
  --white-bg: #ffffff;
  --light-grey: #f8fafc;
  --soft-grey: #f1f5f9;
  
  /* Signal Colors (Contextual Use Only) */
  --alert-red: #dc2626;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;
  
  /* Text Hierarchy */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  /* Borders */
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  
  /* Accents */
  --accent-blue: #2563eb;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--white-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 80px;
}

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

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo, .nav-brand-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  display: none; /* Hide old logo image */
}

.nav-links, .nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a, .nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover, .nav-menu a:hover {
  color: var(--navy-primary);
}

.nav-cta {
  background: var(--navy-primary);
  color: white;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.nav-cta:hover {
  background: #0d2d5e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 31, 68, 0.3);
}

/* Mobile Menu Toggle - Enterprise Design */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border: none;
  background: transparent;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  transition: background 0.2s ease;
  z-index: 1001;
}

.mobile-menu-toggle:hover {
  background: var(--light-grey);
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-primary);
  margin: 3px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Body scroll lock when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Headers */
header {
  padding: 6rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--slate-secondary) 100%);
  color: white;
}

header h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  color: white;
}

header p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* Sections */
section, .content-section {
  padding: 4rem 0;
  background: var(--white-bg);
}

.section-title, h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 2rem;
  text-align: center;
}

.section-subtitle, .content-section p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Buttons */
button, .submit-button, .cta-button {
  background: var(--navy-primary);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

button:hover, .submit-button:hover, .cta-button:hover {
  background: #0d2d5e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 31, 68, 0.3);
}

/* Forms */
input, textarea, select {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
  color: var(--text-primary);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--navy-primary);
  box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.1);
}

/* Footer */
footer {
  background: var(--navy-primary);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Remove old purple gradients and animations */
.brand-accent {
  color: var(--navy-primary);
  font-weight: 700;
  background: none !important;
  -webkit-background-clip: unset !important;
}

/* Remove logo hover animations */
.nav-logo:hover,
footer img:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}

/* Grid layouts */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.service-card:hover {
  border-color: var(--navy-primary);
  box-shadow: 0 4px 12px rgba(10, 31, 68, 0.1);
}

/* Demo Section */
.demo-section {
  background: var(--soft-grey);
  padding: 4rem 0;
}

.demo-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* CONTRAST FIXES FOR DARK BACKGROUNDS */
.dark-section,
.hero-section,
.cta-section,
section[style*="background: var(--navy-primary)"],
section[style*="background: linear-gradient"],
.final-cta {
  color: white !important;
}

.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4,
.hero-section h1,
.hero-section h2,
.cta-section h1,
.cta-section h2,
.final-cta h1,
.final-cta h2 {
  color: white !important;
}

.dark-section p,
.hero-section p,
.cta-section p,
.final-cta p {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure footer has proper contrast */
footer {
  background: var(--navy-primary);
  color: white !important;
}

footer * {
  color: rgba(255, 255, 255, 0.9);
}

footer h1, footer h2, footer h3, footer h4 {
  color: white !important;
}

/* COMPREHENSIVE MOBILE RESPONSIVE DESIGN */
@media (max-width: 991px) {
  /* Base adjustments */
  body {
    padding-top: 64px;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
  }
  
  /* Container padding for mobile */
  .container,
  .nav-container {
    padding: 0 16px !important;
    max-width: 100%;
  }
  
  /* Navigation bar height adjustment - fixed 64px total height */
  .enterprise-nav {
    padding: 0 !important;
  }
  
  .enterprise-nav .nav-container {
    height: 64px;
  }
  
  /* Typography scaling */
  h1, .hero-headline {
    font-size: 2rem !important;
    line-height: 1.15;
  }
  
  h2, .section-title {
    font-size: 1.5rem !important;
    line-height: 1.2;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  p, .section-subtitle {
    font-size: 1rem !important;
    line-height: 1.6;
  }
  
  /* Hide desktop navigation, show hamburger */
  .mega-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    flex-direction: column;
    padding: 0;
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .mega-nav.mobile-active {
    display: flex;
    transform: translateX(0);
  }
  
  .mobile-menu-toggle {
    display: flex;
    order: 3;
  }
  
  /* Nav actions on mobile */
  .nav-actions {
    display: none;
    padding: 1rem 1.5rem;
    background: var(--light-grey);
    border-top: 1px solid var(--border-subtle);
    gap: 0.75rem;
    flex-direction: column;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
  }
  
  .nav-actions.mobile-active {
    display: flex;
  }
  
  .nav-actions .nav-btn-primary,
  .nav-actions .nav-btn-secondary {
    width: 100%;
    text-align: center;
    padding: 14px 20px !important;
    font-size: 1rem !important;
    min-height: 48px;
    justify-content: center;
  }
  
  /* Mobile nav items */
  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .nav-item:last-of-type {
    border-bottom: none;
  }
  
  .nav-link {
    width: 100%;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
    justify-content: space-between;
    min-height: 56px;
    border-radius: 0 !important;
  }
  
  .nav-link:hover {
    background: var(--light-grey);
  }
  
  .dropdown-arrow {
    width: 20px;
    height: 20px;
  }
  
  /* Mobile Mega Dropdown - Accordion Style */
  .mega-dropdown {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100%;
    min-width: auto !important;
    max-width: 100% !important;
    margin-top: 0;
    padding: 0;
    background: var(--light-grey);
    border-radius: 0 !important;
    box-shadow: inset 0 2px 8px rgba(10, 31, 68, 0.06) !important;
    border: none !important;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
  }
  
  .mega-dropdown::before {
    display: none !important;
  }
  
  .nav-item.active .mega-dropdown {
    border-top: 1px solid var(--border-subtle);
  }
  
  /* Dropdown grid becomes vertical stack */
  .dropdown-grid {
    display: block !important;
    padding: 0.5rem 0;
  }
  
  .dropdown-grid.three-col {
    grid-template-columns: 1fr !important;
    min-width: auto !important;
  }
  
  /* Dropdown column */
  .dropdown-column {
    margin-bottom: 0;
    padding: 0;
    border-bottom: none;
  }
  
  /* Links with better touch targets */
  .dropdown-link {
    display: flex;
    flex-direction: column;
    padding: 0.875rem 1.5rem 0.875rem 2rem;
    margin: 0;
    border-radius: 0 !important;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    min-height: 48px;
  }
  
  .dropdown-link:hover,
  .dropdown-link:active {
    background: rgba(10, 31, 68, 0.04);
    border-left-color: var(--navy-primary);
  }
  
  .dropdown-link.featured {
    background: linear-gradient(135deg, var(--navy-primary), var(--slate-secondary));
    color: white;
    padding: 1rem 1.5rem;
    margin: 0.5rem 1rem;
    border-radius: 8px !important;
    border-left: none;
  }
  
  .dropdown-link.featured:hover {
    background: linear-gradient(135deg, var(--navy-primary), var(--slate-secondary));
  }
  
  .link-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--navy-primary);
    margin-bottom: 0.125rem;
  }
  
  .dropdown-link.featured .link-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
  }
  
  .link-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
  }
  
  .dropdown-link.featured .link-desc {
    color: rgba(255,255,255,0.95);
  }
  
  .link-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    margin-top: 0.25rem;
    align-self: flex-start;
  }
  
  /* Nav button styling for mobile accordion */
  .nav-link {
    width: 100%;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-primary);
    border: 1px solid var(--border-subtle);
    margin-bottom: 0.5rem;
  }
  
  .nav-item.active .nav-link {
    background: var(--navy-primary);
    color: white;
    border-color: var(--navy-primary);
  }
  
  .dropdown-arrow {
    stroke: var(--navy-primary);
  }
  
  .nav-item.active .dropdown-arrow {
    stroke: white;
  }
  
  /* Buttons - full width on mobile (exclude navigation) */
  .btn-primary:not(.nav-link),
  .btn-secondary:not(.nav-link),
  .cta-button,
  .nav-cta,
  .submit-button,
  a.btn-primary-large,
  a.btn-secondary-large {
    width: 100% !important;
    padding: 16px 20px !important;
    font-size: 16px !important;
    min-height: 44px;
    text-align: center;
    display: block !important;
  }
  
  /* Form adjustments */
  .form-row {
    grid-template-columns: 1fr;
  }
  
  input,
  textarea,
  select {
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 12px !important;
    min-height: 44px;
  }
  
  /* Grid layouts - stack on mobile */
  .services-grid,
  .feature-grid,
  .platform-grid,
  .solution-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Section padding */
  section,
  .content-section {
    padding: 2rem 1rem !important;
  }
  
  header {
    padding: 3rem 1rem 2rem !important;
  }
  
  /* Demo section */
  .demo-form {
    padding: 1.5rem !important;
    margin: 0 16px;
  }
  
  /* Service cards */
  .service-card {
    padding: 1.5rem !important;
  }
  
  /* Footer adjustments */
  footer {
    padding: 2rem 1rem !important;
  }
  
  .footer-bottom {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
  }
  
  /* Prevent horizontal scroll */
  * {
    max-width: 100vw !important;
    overflow-x: hidden;
  }
  
  /* Ensure touch targets are accessible */
  a, button, input, textarea, select {
    min-height: 44px;
    line-height: normal;
  }
}

/* Tablet responsive adjustments */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 2rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.35rem !important;
  }
  
  .container {
    padding: 0 12px !important;
  }
  
  section {
    padding: 1.5rem 0 !important;
  }
}

/* Override old dark backgrounds */
body.dark-theme,
body[style*="background-color: var(--primary-bg)"] {
  background-color: var(--white-bg) !important;
}

nav[style*="background: rgba(10, 6, 18"] {
  background: rgba(255, 255, 255, 0.98) !important;
}

/* Remove glow animations */
@keyframes logoGlow {
  0%, 100% { box-shadow: none; }
}

@keyframes titleGlow {
  0%, 100% { filter: none; }
}

.glow-animate {
  animation: none !important;
}