/* 
 * Interactive Navigation and Anchor Links
 * Enhanced user experience with smooth scrolling and visual feedback
 */

:root {
  --primary-color: #1A365D;     /* Deep blue */
  --secondary-color: #3182CE;   /* Medium blue */
  --accent-color: #D69E2E;      /* Gold */
  --text-dark: #2D3748;         /* Dark gray for text */
  --text-light: #FFFFFF;        /* White for text on dark backgrounds */
  --background-light: #FFFFFF;  /* White background */
  --background-gray: #F7FAFC;   /* Light gray background */
  --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition-standard: all 0.3s ease-in-out;
}

/* Header and Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: var(--transition-standard);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

/* Logo styling */
.logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: var(--transition-standard);
}

.logo:hover {
  transform: scale(1.05);
}

.logo span {
  color: var(--accent-color);
}

/* Navigation menu */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0 0.5rem;
  position: relative;
}

.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: var(--transition-standard);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition-standard);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Header CTA button */
.nav-menu .cta-button {
  margin-left: 1.5rem;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-standard);
}

.mobile-menu-toggle:hover {
  color: var(--accent-color);
}

/* Progress bar */
.progress-container {
  width: 100%;
  height: 4px;
  background: transparent;
  position: absolute;
  bottom: 0;
  left: 0;
}

.progress-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  width: 0%;
  transition: width 0.1s ease;
}

/* Side navigation dots */
.side-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.side-nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(26, 54, 93, 0.2);
  margin: 0.75rem 0;
  transition: var(--transition-standard);
  cursor: pointer;
  position: relative;
}

.side-nav-dot::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-standard);
}

.side-nav-dot:hover::before {
  opacity: 1;
  right: 30px;
}

.side-nav-dot.active {
  background-color: var(--accent-color);
  transform: scale(1.3);
}

.side-nav-dot:hover {
  background-color: var(--primary-color);
}

/* Section anchors with offset for fixed header */
section {
  scroll-margin-top: 100px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-standard);
  opacity: 0;
  pointer-events: none;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.back-to-top i {
  font-size: 1.25rem;
}

/* Section navigation indicators */
.section-indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transition: var(--transition-standard);
}

.indicator-dot.active {
  background-color: var(--text-light);
  transform: scale(1.3);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--background-light);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    transition: var(--transition-standard);
    z-index: 999;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-item {
    margin: 0.5rem 0;
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: 1rem 0;
    width: 100%;
  }
  
  .nav-menu .cta-button {
    margin: 1.5rem 0 0;
    width: 100%;
    text-align: center;
  }
  
  .mobile-menu-toggle {
    display: block;
    z-index: 1000;
  }
  
  .side-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
  
  .back-to-top i {
    font-size: 1rem;
  }
}

/* High-contrast mode for accessibility */
@media (prefers-contrast: high) {
  header {
    background-color: #fff;
    box-shadow: 0 2px 0 #000;
  }
  
  .nav-link {
    color: #000;
  }
  
  .nav-link::after {
    background-color: #000;
  }
  
  .side-nav-dot {
    border: 1px solid #000;
  }
  
  .side-nav-dot.active {
    background-color: #000;
  }
}
