/* WE3 Color Palette */
:root {
  --we3-blue: #1E2AAF;
  --we3-purple: #7A2CCB;
  --we3-pink: #E53958;
  --we3-skyblue: #65B9C9;

  --we3-hero-dark: #0C0D3B;
  --we3-hero-purple: #311B58;
  --we3-hero-pink: #C13267;

  --we3-white: #FFFFFF;
  --we3-grey-light: #F5F5F7;
  --we3-grey-mid: #9CA3AF;
  --we3-grey-dark: #1A1A1A;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: linear-gradient(135deg, var(--we3-grey-light) 0%, var(--we3-white) 100%);
  color: var(--we3-grey-dark);
  line-height: 1.6;
}

/* Header Styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background: linear-gradient(135deg, var(--we3-hero-dark) 0%, var(--we3-hero-purple) 100%);
  color: var(--we3-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  width: 100%;
  min-height: 70px;
  height: auto;
}

.header-left {
  display: flex;
  align-items: center;
}

.company-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.company-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.company-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--we3-white);
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 800px;
  margin: 0 30px;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border: none;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--we3-white);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--we3-skyblue);
  box-shadow: 0 0 20px rgba(101, 185, 201, 0.3);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.header-right {
  display: flex;
  align-items: center;
}

.project-info {
  text-align: right;
}

.project-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--we3-skyblue);
  margin: 0;
}

.project-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 5px;
}

.company-link,
.project-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.company-link:hover,
.project-link:hover {
  color: var(--we3-skyblue);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  background: var(--we3-blue);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 15px rgba(30, 42, 175, 0.3);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--we3-purple);
  transform: scale(1.05);
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.container {
  display: flex;
  width: 100%;
  flex: 1;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--we3-hero-dark) 0%, var(--we3-hero-purple) 100%);
  color: var(--we3-white);
  padding: 30px 20px;
  overflow-y: auto;
  position: fixed;
  top: 70px;
  left: 0;
  height: calc(100vh - 70px);
  z-index: 1000;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(30, 42, 175, 0.1) 0%, rgba(122, 44, 203, 0.1) 100%);
  pointer-events: none;
}

.sidebar h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--we3-skyblue);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar ul {
  list-style-type: none;
  position: relative;
  z-index: 1;
}

.sidebar > ul > li {
  margin: 12px 0;
  position: relative;
}

.sidebar ul li a {
  text-decoration: none;
  color: var(--we3-white);
  font-size: 16px;
  font-weight: 500;
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar ul li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.sidebar ul li a:hover::before {
  left: 100%;
}

.sidebar ul li a:hover {
  background: linear-gradient(135deg, var(--we3-blue) 0%, var(--we3-purple) 100%);
  color: var(--we3-white);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(30, 42, 175, 0.3);
}

/* Nested navigation styles */
.sidebar ul ul {
  margin-left: 20px;
  margin-top: 8px;
  border-left: 2px solid var(--we3-skyblue);
  padding-left: 15px;
}

.sidebar ul ul li {
  margin: 6px 0;
}

.sidebar ul ul li a {
  font-size: 14px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.8);
}

.sidebar ul ul ul {
  margin-left: 15px;
  border-left: 1px solid var(--we3-pink);
}

.sidebar ul ul ul li a {
  font-size: 13px;
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.7);
}

/* Main Content Styles */
.content {
  flex: 1;
  padding: 50px;
  padding-left: 330px;
  padding-top: 90px;
  overflow-y: auto;
  background: var(--we3-white);
  position: relative;
  min-height: calc(100vh - 70px);
}

.content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--we3-blue) 0%, var(--we3-purple) 50%, var(--we3-pink) 100%);
}

/* Typography */
.content h1 {
  font-size: 32px;
  color: var(--we3-hero-dark);
  margin-bottom: 20px;
  border-bottom: 3px solid var(--we3-blue);
  padding-bottom: 12px;
  position: relative;
  font-weight: 700;
}

.content h1::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--we3-pink);
}

.content h2 {
  font-size: 24px;
  color: var(--we3-blue);
  margin-top: 35px;
  margin-bottom: 15px;
  border-left: 5px solid var(--we3-purple);
  padding-left: 15px;
  font-weight: 600;
  position: relative;
}

.content h2::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--we3-blue) 0%, var(--we3-purple) 100%);
}

.content h3 {
  font-size: 20px;
  color: var(--we3-purple);
  margin-top: 25px;
  margin-bottom: 12px;
  font-weight: 600;
}

.content p {
  line-height: 1.8;
  font-size: 16px;
  margin-bottom: 18px;
  color: var(--we3-grey-dark);
  text-align: justify;
}

.content ul {
  margin-left: 25px;
  list-style: none;
  color: var(--we3-grey-dark);
}

.content ul li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 25px;
}

.content ul li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--we3-pink);
  font-size: 12px;
  top: 2px;
}

.content ul li b {
  color: var(--we3-blue);
  font-weight: 600;
}

/* Code blocks */
.content pre {
  background: var(--we3-grey-light);
  border: 1px solid var(--we3-grey-mid);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: var(--we3-grey-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Images */
.content img {
  margin: 25px 0;
  border: 2px solid var(--we3-grey-mid);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.content img:hover {
  transform: scale(1.02);
}

/* Article styling */
article {
  margin-bottom: 30px;
  padding: 25px;
  background: var(--we3-white);
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--we3-grey-light);
  transition: all 0.3s ease;
}

article:hover {
  box-shadow: 0 5px 25px rgba(30, 42, 175, 0.1);
  transform: translateY(-2px);
}

/* Section styling */
section {
  margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 250px;
  }
  
  .content {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    padding: 20px;
  }

  .sidebar h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .content {
    padding: 20px;
  }

  .content h1 {
    font-size: 28px;
  }

  .content h2 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 15px;
  }

  .content h1 {
    font-size: 24px;
  }

  .content h2 {
    font-size: 20px;
  }

  .sidebar ul li a {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--we3-grey-light);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--we3-blue) 0%, var(--we3-purple) 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--we3-purple) 0%, var(--we3-pink) 100%);
}

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content section {
  animation: fadeInUp 0.6s ease-out;
}

/* Focus states for accessibility */
.sidebar ul li a:focus {
  outline: 2px solid var(--we3-skyblue);
  outline-offset: 2px;
}

/* Chapter 6 and subsequent chapters use global styles */

/* Ensure header is always visible */
.header {
  z-index: 9999 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 80px !important;
}

/* Ensure all content sections have proper z-index */
.content {
  position: relative;
  z-index: 1;
}

.content section {
  position: relative;
  z-index: 1;
}

.content article {
  position: relative;
  z-index: 1;
}

/* Ensure all chapters have consistent styling - Remove specific overrides */
#chapter6, #chapter7, #team {
  position: relative;
  z-index: 1;
}

/* Chapter 6, 7, and Team sections use global styles for consistency */

/* Team Section Styles */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.team-member {
  background: var(--we3-white);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid var(--we3-grey-light);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(30, 42, 175, 0.15);
  border-color: var(--we3-blue);
}

.team-member::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(30, 42, 175, 0.1), transparent);
  transition: left 0.5s ease;
}

.team-member:hover::before {
  left: 100%;
}

.click-indicator {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 12px;
  color: var(--we3-purple);
  opacity: 0;
  transition: opacity 0.3s ease;
  font-weight: 600;
}

.team-member:hover .click-indicator {
  opacity: 1;
}

.member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--we3-blue) 0%, var(--we3-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 15px rgba(30, 42, 175, 0.3);
}

.avatar-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--we3-white);
}

.team-member h3 {
  font-size: 20px;
  color: var(--we3-blue);
  margin-bottom: 8px;
  font-weight: 600;
}

.member-role {
  color: var(--we3-purple);
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 14px;
}

.member-description {
  color: var(--we3-grey-dark);
  font-size: 14px;
  line-height: 1.5;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 25px 0;
}

.contact-item {
  background: var(--we3-white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--we3-grey-light);
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(30, 42, 175, 0.1);
}

.contact-item h4 {
  color: var(--we3-blue);
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 600;
}

.contact-item p {
  margin-bottom: 8px;
  font-size: 14px;
}

.contact-item a {
  color: var(--we3-purple);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--we3-blue);
}

/* Fix bullet points styling */
.content ul li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--we3-pink);
  font-size: 12px;
  top: 2px;
}

/* Responsive Design Updates */
@media (max-width: 1024px) {
  .header {
    padding: 12px 20px;
  }
  
  .header-center {
    margin: 0 20px;
  }
  
  .search-container {
    max-width: 300px;
  }
  
  .project-name {
    font-size: 20px;
  }
  
  .company-name {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    height: auto;
    min-height: 100px;
  }
  
  .header-left,
  .header-right {
    width: 100%;
    justify-content: center;
  }
  
  .header-center {
    margin: 0;
    max-width: 100%;
  }
  
  .search-container {
    max-width: 100%;
  }
  
  .project-info {
    text-align: center;
  }
  
  .sidebar {
    position: fixed;
    top: 100px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 100px);
    transition: left 0.3s ease;
    z-index: 1000;
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .content {
    padding-left: 20px;
    padding-top: 110px;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-info {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 10px;
  }
  
  .search-input {
    padding: 10px 45px 10px 15px;
    font-size: 14px;
  }
  
  .project-name {
    font-size: 18px;
  }
  
  .company-name {
    font-size: 16px;
  }
  
  .team-member {
    padding: 20px;
  }
  
  .member-avatar {
    width: 60px;
    height: 60px;
  }
  
  .avatar-text {
    font-size: 20px;
  }
}

/* Print styles */
@media print {
  .header {
    display: none;
  }
  
  .sidebar {
    display: none;
  }
  
  .content {
    padding: 0;
  }
  
  .content h1,
  .content h2,
  .content h3 {
    color: black !important;
  }
}