/* Header and Footer styles */

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-bg);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  margin-right: var(--spacing-md);
}

.logo img {
  height: 40px;
  width: auto;
}

/* Header Navigation */
.header-nav, nav {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background-color: transparent; /* Changed from var(--color-bg) to transparent */
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.5rem;
  position: relative;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

/* Nav Button Separators */
.nav-separator {
  display: inline-block;
  height: 1.2rem;
  width: 1px;
  background-color: #999999;
  margin: 0 0.3rem;
  opacity: 0.5;
  align-self: center;
  vertical-align: middle;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

body.dark-mode .nav-separator {
  background-color: #777777;
  opacity: 0.6;
}

.nav_button {  position: relative;
  padding: 8px 16px;
  margin: 0;
  border: none;
  position: relative;
  margin: 0 0.2rem;
  background: transparent !important;
  border: 1px solid transparent;
  color: var(--color-text) !important;
  box-shadow: none;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 2;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
}

.nav_button:hover:not(.active) {
  background: rgba(59, 151, 165, 0.1) !important;
  border-color: var(--color-secondary);
  transform: translateY(-1px);
}

.nav_button.active {
  background: linear-gradient(to bottom, var(--color-secondary), var(--color-primary)) !important;
  color: white !important;
  border: 1px solid var(--color-accent);
  box-shadow: 0 2px 10px rgba(59, 151, 165, 0.2);
  animation: buttonPulse 2s infinite ease-in-out;
}

/* Footer */
footer {
  margin-top: auto;
  background-color: var(--color-bg);
  padding: var(--spacing-xs) var(--spacing-md);
  border-top: 1px solid var(--color-primary);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  text-align: left;
  font-size: 0.75rem;
  color: var(--color-text);
}

.contact {
  width: auto;
  max-width: 60%;
}

.header_contact {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  font-size: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.header_email {
  color: var(--color-primary);
}

.divider {
  height: 1px;
  width: 100%;
  /* No background color as required */
}

/* Responsive design for header/footer */
@media (max-width: 768px) {
  .header-nav {
    gap: var(--spacing-xs);
  }
  
  /* Adjust separators for smaller screens */
  .nav-separator {
    height: 1rem;
  }
  
  footer {
    flex-direction: column;
    padding: var(--spacing-xs);
  }
  
  .footer-copyright {
    text-align: center;
    margin-bottom: var(--spacing-xs);
  }
  
  .contact {
    max-width: 100%;
  }
  
  .header_contact {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
  }
}

@media (max-width: 900px) {
  .header-nav, nav {
    gap: 0.5rem;
    margin-left: 2vw;
    margin-right: 2vw;
  }
  .nav_button {
    max-width: 48vw;
    min-width: 120px;
  }
  #themeToggle {
    position: absolute;
    top: 1.2rem;
    right: 2vw;
    margin: 0;
    align-self: flex-end;
    z-index: 101;
  }
}

@media (max-width: 630px) {
  .header-nav, nav {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }
  .nav_button {
    flex: 1 1 45%;
    min-width: 140px;
    max-width: 48vw;
    height: 60px;
    font-size: 1rem;
    white-space: normal;
    text-overflow: ellipsis;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }  /* Hide separators in mobile layouts where buttons stack */
  .nav-separator {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav_button {
    min-width: 60px;
    min-height: 60px;
    max-width: 100vw;
    max-height: 60px;
    width: 100%;
    height: 60px;
    border-radius: 12px;
    font-size: 0.9rem;
    padding: 0;
    white-space: normal;
    text-overflow: clip;
    overflow: hidden;
  }
  #themeToggle {
    top: 0.5rem;
    right: 1vw;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    aspect-ratio: 1/1;
  }
}