/* Cipher Security - Modern Enterprise Cybersecurity Website */
/* Performance-first CSS with minimal dependencies */

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(16px, 1.5vw, 18px);
}

body {
  margin: 0;
  padding-top: 60px; /* Match header height */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Color System - Locked to brand palette */
:root {
  --primary: #0B252F;
  --secondary-bg: #265566;
  --ui-accent: #35788B;
  --border-secondary: #568A8F;
  --primary-cta: #5188D5;
  --hover-highlight: #68D0EE;
  --white: #ffffff;
  --text-light: #64748b;
}

/* Typography System */
body {
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Center main headings */
h1, h2, .section h3, .hero h1, .section h2 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin: 1.5rem auto 1rem;
  color: var(--primary);
  text-align: center;
  width: 100%;
}

h1 { 
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-top: 0;
}

h2 { 
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 2.5rem;
}

h3 { 
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2rem;
}

h4 { 
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-top: 1.75rem;
}

p {
  margin: 0 auto 1.25rem;
  color: var(--primary);
  max-width: 65ch;
  line-height: 1.6;
  text-align: center;
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.section-content p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.card {
  text-align: center;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card p {
  text-align: center;
  margin: 1rem auto;
  max-width: 90%;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.card p {
  margin-bottom: 0;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-content p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem auto 0;
  max-width: 800px;
  width: 100%;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .section-content, .hero-content {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
}

a {
  color: var(--primary-cta);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--hover-highlight);
}

/* Universal Header - Fixed Component */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  z-index: 1000; /* High z-index but lower than dropdown */
  backdrop-filter: blur(10px);
  transition: all 300ms ease;
  background-color: var(--primary);
  min-height: 60px;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header states - On hero section (dark background) */
.header.on-hero {
  background: var(--primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 300ms ease;
}

.header.on-hero .brand-name,
.header.on-hero .nav-link,
.header.on-hero .dropdown-toggle {
  color: var(--white);
  transition: color 300ms ease;
}

.header.on-hero .nav-link:hover,
.header.on-hero .dropdown-toggle:hover {
  color: var(--hover-highlight);
}

.header.on-hero .mobile-menu-toggle span {
  background: var(--white);
  transition: background-color 300ms ease;
}

/* Active/current link when on hero */
.header.on-hero .nav-link.active,
.header.on-hero .nav-link[aria-current="page"] {
  color: var(--hover-highlight);
  font-weight: 600;
}

/* Scrolled header state */
.header.scrolled {
  background: rgba(255, 255, 255, 1) !important; /* Changed from 0.98 to 1 for full opacity */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Text colors when scrolled (white background) */
.header.scrolled .brand-name,
.header.scrolled .nav-link,
.header.scrolled .dropdown-toggle {
  color: var(--primary) !important;
}

/* Hover states when scrolled */
.header.scrolled .nav-link:hover,
.header.scrolled .dropdown-toggle:hover {
  color: var(--ui-accent) !important;
}

/* Active/current link when scrolled */
.header.scrolled .nav-link.active,
.header.scrolled .nav-link[aria-current="page"] {
  color: var(--ui-accent) !important;
  font-weight: 600;
}

/* Mobile menu toggle color when scrolled */
.header.scrolled .mobile-menu-toggle span {
  background: var(--primary) !important;
}

/* Hover states when scrolled */
.header.scrolled .nav-link:hover,
.header.scrolled .dropdown-toggle:hover {
  color: var(--ui-accent) !important;
}

/* Active/current link when scrolled */
.header.scrolled .nav-link.active,
.header.scrolled .nav-link[aria-current="page"] {
  color: var(--ui-accent) !important;
  font-weight: 600;
}

/* Dropdown menu when header is scrolled */
.header.scrolled .dropdown-menu {
  background: var(--primary);
  border: 1px solid var(--border-secondary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header.scrolled .dropdown-item {
  color: var(--white) !important;
}

.header.scrolled .dropdown-item:hover,
.header.scrolled .dropdown-item:focus {
  background: transparent;
  color: var(--hover-highlight) !important;
}

/* Mobile menu colors */
.header.on-hero .nav.active {
  background: var(--primary);
}

.header.on-hero .nav.active .nav-link,
.header.on-hero .nav.active .dropdown-toggle {
  color: var(--white);
}

.header.on-hero .nav.active .dropdown-menu {
  background: var(--white);
  border-color: var(--border-secondary);
}

.header.on-hero .nav.active .dropdown-item {
  color: var(--primary);
  border-color: var(--border-secondary);
}

.header.on-hero .nav.active .dropdown-item:hover {
  background: var(--secondary-bg);
  color: var(--white);
}

.header.scrolled .nav.active {
  background: var(--primary);
}

.header.scrolled .nav.active .dropdown-menu {
  background: var(--primary);
  border: 1px solid var(--border-secondary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header.scrolled .nav.active .dropdown-item {
  color: var(--white);
  border-color: var(--border-secondary);
}

.header.scrolled .nav.active .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* Mobile dropdown specific fixes */
.nav.active .dropdown {
  position: relative;
  width: 100%;
}

.nav.active .dropdown-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  margin: 0.25rem 0 0 0;
  padding: 0;
  box-shadow: none;
  border: none;
  background: transparent;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin 0.3s ease;
  padding: 0;
}

.nav.active .dropdown.active .dropdown-menu {
  max-height: 500px; /* Adjust based on your content */
  margin: 0.5rem 0 0.5rem 1.5rem;
}

/* Mobile menu dropdown toggle */
@media (max-width: 768px) {
  .nav-dropdown .dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.75rem 1.5rem;
    position: relative;
  }
  
  .nav-dropdown .dropdown-toggle::after {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
}

/* Desktop dropdown toggle */
@media (min-width: 769px) {
  .nav-dropdown .dropdown-toggle {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0.75rem 2rem 0.75rem 1.5rem;
    position: relative;
  }
  
  .nav-dropdown .dropdown-toggle::after {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
}

/* This rule is now handled in the media queries above */

.dropdown.active .dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav.active .dropdown-item {
  padding: 0.75rem 1rem;
  border: none;
  color: var(--white);
  opacity: 0.9;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  border-radius: 0.25rem;
}

.nav.active .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
  text-decoration: none;
  color: var(--white);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand Unit - Logo + Animated Name */
.brand-unit {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
}

/* Decrypt Animation for Brand Name */
@keyframes decrypt {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-name.animate {
  animation: decrypt 450ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Ensure text remains styled during animation */
.brand-name {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  display: inline-block;
  letter-spacing: -0.02em;
  transition: color 300ms ease;
}

/* Initial state - will be overridden by JavaScript */
.header:not(.on-hero):not(.scrolled) .brand-name {
  color: var(--primary);
}

/* Navigation */
.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 150ms ease;
  position: relative;
  text-decoration: none;
  display: inline-block;
}

/* Initial state for nav links and dropdown - will be overridden */
.header:not(.on-hero):not(.scrolled) .nav-link,
.header:not(.on-hero):not(.scrolled) .dropdown-toggle {
  color: var(--primary);
}

/* Menu states: selected (lighter blue) and hover (brighter blue) */
.nav-link.active,
.nav-link[aria-current="page"],
.dropdown-toggle.active,
.dropdown-toggle[aria-current="page"] {
  color: var(--white);
  background-color: var(--ui-accent);
}

.nav-link:hover,
.dropdown-toggle:hover {
  color: var(--white);
  background-color: var(--hover-highlight);
}

/* ============================================
   Dropdown Navigation - New Implementation
   ============================================ */

/* Base Dropdown Styles */
.nav-dropdown {
  position: relative;
  display: inline-block;
  height: 100%;
  z-index: 1001; /* Ensure dropdown is above other content */
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  color: inherit;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 0.75rem 1.5rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  height: 100%;
  white-space: nowrap;
  position: relative;
  min-width: 100px;
}

.dropdown-icon {
  font-size: 0.6em;
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: block;
  min-width: 12rem;
  padding: 0.5rem 0;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--white);
  text-align: left;
  background-color: var(--primary);
  background-clip: padding-box;
  border: 1px solid var(--border-secondary);
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  opacity: 1;
  visibility: hidden;
  transform: translateY(5px);
  transition: all 0.25s ease-out;
  pointer-events: none;
}

/* Active States */
.nav-dropdown[data-dropdown-open="true"] .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  max-height: 500px;
  overflow-y: auto;
  pointer-events: auto; /* Enable interaction when visible */
}

.nav-dropdown[data-dropdown-open="true"] .dropdown-icon {
  transform: rotate(180deg);
}

/* Dropdown Items */
.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.7rem 1.75rem;
  clear: both;
  font-weight: 500;
  color: var(--white);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  transition: all 0.15s ease-in-out;
  position: relative;
  z-index: 1;
  line-height: 1.4;
  margin: 0.15rem 0;
}

.dropdown-item,
.header.scrolled .dropdown-item {
  color: var(--white) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: transparent;
  color: var(--hover-highlight) !important;
  padding-left: 2rem;
  text-decoration: none;
}

.dropdown-item:active {
  background-color: var(--secondary-bg);
  color: var(--white);
}

.dropdown-item-text {
  display: block;
  position: relative;
  padding-left: 0.5rem;
}

.dropdown-item-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.25rem;
  height: 0.25rem;
  background: currentColor;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dropdown-item:hover .dropdown-item-text::before,
.dropdown-item:focus .dropdown-item-text::before {
  opacity: 1;
}

/* Header-specific styles */
.header .dropdown-menu {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav-dropdown {
    width: 100%;
    text-align: center;
    padding: 0.25rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
  }
  
  /* Specific styles for the policies dropdown menu */
  .nav-dropdown .dropdown-menu {
    width: 100%;
    text-align: center;
    padding: 0;
    margin: 0.5rem 0 0 0;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    left: 0;
    right: 0;
  }
  
  .nav-dropdown[data-dropdown-open="true"] .dropdown-menu {
    max-height: 500px;
    padding: 0.5rem 0;
    margin-top: 0.75rem;
  }
  
  .nav-dropdown .dropdown-item {
    display: block;
    padding: 0.9rem 1.5rem;
    color: var(--white);
    font-size: 1em;
    text-align: center;
    width: 100%;
    margin: 0;
  }
  
  .nav-dropdown .dropdown-item a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }
  
  .nav-dropdown .dropdown-item-text {
    display: inline-block;
    text-align: center;
    width: 100%;
    padding: 0;
  }
  
  .dropdown-toggle {
    width: 90%;
    justify-content: center;
    padding: 1rem;
    font-size: 1.1em;
    font-weight: 500;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin: 0.25rem auto;
    display: flex;
    align-items: center;
    text-align: center;
  }
  
  .dropdown-icon {
    margin-left: 8px;
    font-size: 0.7em;
    transition: transform 0.3s ease;
  }
  
  .dropdown-menu {
    width: 90%;
    text-align: center;
    padding: 0;
    margin: 0.5rem auto 0;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .nav-dropdown[data-dropdown-open="true"] .dropdown-menu {
    max-height: 500px;
    padding: 0.5rem 0;
    margin-top: 0.75rem;
  }
  
  .dropdown-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.9rem 1.5rem;
    color: var(--white);
    font-size: 1em;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
    opacity: 0.9;
    width: 100%;
  }
  
  .dropdown-item a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }
  
  .dropdown-item:hover,
  .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    padding-left: 1.5rem;
  }
  
  .dropdown-item-text {
    display: inline-block;
    text-align: center;
    width: 100%;
    padding: 0;
  }
  
  .dropdown-item-text::before {
    display: none;
  }
  
  .dropdown-item:hover .dropdown-item-text::after {
    content: '→';
    margin-left: 0.5rem;
    display: inline-block;
    position: static;
    opacity: 0.8;
    transition: transform 0.2s ease;
  }
  
  .dropdown-item:active {
    transform: translateY(1px);
  }
  
  /* Ensure all text in dropdown is centered */
  .nav-dropdown .dropdown-menu a {
    text-align: center;
    justify-content: center;
    display: flex;
    width: 100%;
  }
  
  .nav-dropdown .dropdown-item-text {
    text-align: center;
    width: 100%;
    display: inline-block;
  }
}

/* Desktop hover effect */
@media (min-width: 769px) {
  .dropdown-toggle {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  .dropdown-toggle::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
    transform: translateX(-50%);
  }
  
  .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
  }
  
  .dropdown-toggle:hover::before,
  .nav-dropdown[data-dropdown-open="true"] .dropdown-toggle::before {
    width: 60%;
  }
  
  .nav-dropdown[data-dropdown-open="true"] .dropdown-toggle {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
  }
  
  .dropdown-menu {
    border: 1px solid var(--border-secondary);
    background: var(--primary);
    backdrop-filter: none;
    min-width: 220px;
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.7rem 1.5rem;
    transition: all 0.2s ease;
  }
  
  .dropdown-item:hover,
  .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    padding-left: 1.75rem;
  }
  
  .dropdown-item-text::before {
    width: 6px;
    height: 6px;
    left: 8px;
    background: var(--white);
    opacity: 0;
    transition: all 0.3s ease;
  }
  
  .dropdown-item:hover .dropdown-item-text::before {
    opacity: 1;
    left: 12px;
  }
}

/* Ensure header doesn't move when dropdown opens */
.header {
  overflow: visible !important;
}

.header-container {
  position: relative;
  z-index: 1000;
}

/* Ensure dropdown is above other content */
.dropdown-menu {
  z-index: 1001;
}
.dropdown {
  position: relative;
  display: inline-block;
  height: 100%;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: 0.5rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: all 150ms ease;
  border-radius: 0.25rem;
  height: 100%;
  box-sizing: border-box;
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 0.5rem;
  margin-left: 0.5rem;
  transition: transform 150ms ease;
  flex-shrink: 0;
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  top: 0;
}

.dropdown.active .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border-secondary);
  border-radius: 0 0 0.25rem 0.25rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 150ms ease;
  z-index: 1001;
  margin-top: -1px; /* Align with bottom border of header */
}

/* Ensure dropdown stays within viewport */
.dropdown-menu {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header-specific dropdown styles */
.header .dropdown-menu {
  margin-top: 0;
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background-color: var(--primary);
  border-color: var(--border-secondary);
}

/* Ensure header doesn't move when dropdown opens */
.header {
  overflow: visible; /* Allow dropdown to overflow */
}

.header-container {
  position: relative;
  z-index: 1000; /* Ensure header stays above other content */
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--primary);
  border-bottom: 1px solid var(--border-secondary);
  transition: background 150ms ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--secondary-bg);
  color: var(--white);
}

/* Policies dropdown specific fixes for header states */
.header.on-hero .dropdown-menu {
  background: var(--primary);
  border-color: var(--border-secondary);
}

.header.on-hero .dropdown-item {
  color: var(--primary);
}

.header.on-hero .dropdown-item:hover {
  background: var(--secondary-bg);
  color: var(--white);
}

.header.scrolled .dropdown-menu {
  background: var(--primary);
  border-color: var(--border-secondary);
  backdrop-filter: none;
}

.header.scrolled .dropdown-item {
  color: var(--white);
}

.header.scrolled .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary);
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 5px 0;
  transition: all 150ms ease;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary-bg) 100%);
  color: var(--white);
  padding: clamp(4rem, 10vw, 8rem) 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(104, 208, 238, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* CTA Buttons */
.cta-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.875rem 2rem;
  background: var(--primary-cta);
  color: var(--white);
  border-radius: 0.5rem;
  font-weight: 600;
  margin: 0.5rem auto;
  min-width: 200px;
  text-decoration: none;
  transition: all 150ms ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.cta-button:hover {
  background: var(--hover-highlight);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(81, 136, 213, 0.3);
}

.cta-secondary {
  background: transparent;
  border: 2px solid var(--primary-cta);
  color: var(--primary-cta);
  display: inline-flex;
  justify-content: center;
  margin: 0.5rem auto;
  min-width: 200px;
}

.cta-secondary:hover {
  background: var(--primary-cta);
  color: var(--white);
}

/* Content Sections */
.section {
  padding: clamp(3rem, 8vw, 6rem) 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Section Alt - Full-width blue backgrounds */
.section-alt {
  background: var(--secondary-bg);
  color: var(--white);
  width: 100%;
  margin: 0;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-alt .section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-alt h2,
.section-alt h3,
.section-alt p {
  color: var(--white);
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border-secondary);
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 150ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.section-alt .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-secondary);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.footer.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.footer.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-logo {
  width: 36px;
  height: 36px;
  display: inline-block;
  flex-shrink: 0;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-brand-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.footer-brand-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  margin-top: 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0;
  transition: color 150ms ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--hover-highlight);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Tablet and Desktop styles */
@media (min-width: 640px) {
  .footer {
    padding: 2.5rem 1.5rem;
  }
  
  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .footer {
    padding: 3rem 2rem 2rem;
  }
  
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .footer-brand {
    max-width: 300px;
    margin-bottom: 0;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0;
    text-align: right;
  }
  
  .footer-links a {
    justify-content: flex-end;
  }
}

/* Large desktop */
@media (min-width: 1024px) {
  .footer {
    padding: 3.5rem 3rem 2.5rem;
  }
  
  .footer-brand {
    max-width: 350px;
  }
}

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-container {
    padding: 1rem;
  }
  
  .nav {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: 60px; /* Match header height */
    left: 0;
    right: 0;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 300ms ease;
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
  }
  
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    margin: 0 auto;
    padding: 0;
    max-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow: hidden;
    transition: max-height 0.3s ease, margin 0.3s ease;
  }
  
  .dropdown.active .dropdown-menu {
    max-height: 500px; /* Adjust based on your content */
    margin: 0.5rem 0 0.5rem 1.5rem;
  }
  
  .dropdown-item {
    color: var(--white);
    border: none;
    padding: 0.5rem 0;
    opacity: 0.9;
    transition: opacity 0.2s ease;
  }
  
  .dropdown-item:hover {
    background: transparent;
    color: var(--white);
    opacity: 1;
    text-decoration: underline;
  }
  
  .hero {
    padding: 4rem 1.5rem;
  }
  
  .section {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.125rem;
  }
  
  .logo {
    width: 32px;
    height: 32px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .cta-button {
    width: 100%;
    max-width: 300px;
    margin: 0.5rem auto;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .brand-name.animate {
    animation: none;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus Management */
.nav-link:focus,
.cta-button:focus,
.dropdown-item:focus {
  outline: 2px solid var(--primary-cta);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .footer {
    position: static;
  }
  
  .nav {
    display: none;
  }
}
