/* ============================================= */
/*               HEADER STYLES                  */
/* ============================================= */

/* Reset and Base Styles */
.header-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  background-color: #f8f9fa;
  padding: 10px 20px;
  font-family: 'Arial', sans-serif;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Left Group Styles */
.left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto; /* Pushes everything else to the right */
}

.left-group img {
  max-height: 60px;
  display: block;
  width: auto;
}

.left-group h1 {
  font-size: 1.8rem;
  color: black;
  white-space: nowrap;
  margin: 0;
  font-weight: 600;
}

/* Right Group Styles */
.right-group {
  margin-left: auto; /* Ensures group stays right */
}

.right-group nav {
  display: flex;
  gap: 20px;
}

.right-group nav a {
  color: #007bff;
  text-decoration: none;
  font-size: 16px;
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
  padding: 5px 0;
}

.right-group nav a:hover {
  color: #0056b3;
}

.right-group nav a::after {
  content: "";
  display: block;
  height: 2px;
  width: 0%;
  background-color: #007bff;
  transition: width 0.3s ease;
  position: absolute;
  bottom: -4px;
  left: 0;
}

.right-group nav a:hover::after {
  width: 100%;
}

/* ============================================= */
/*               RESPONSIVE BREAKPOINTS         */
/* ============================================= */

/* TV Monitor: >1920px (4K screens or wide displays) */
@media (min-width: 1921px) {
  header {
    max-width: 1600px;
    padding: 20px 40px;
  }

  .left-group h1 {
    font-size: 2.2rem;
  }

  .right-group nav {
    gap: 30px;
  }

  .right-group nav a {
    font-size: 20px;
  }
}

/* Desktop: 1025px to 1920px (Default styles - no changes needed) */

/* Tablet / iPad: 768px to 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  header {
    flex-direction: row; /* Keep row direction on tablets */
    padding: 15px 20px;
  }

  .left-group {
    margin-bottom: 0;
  }

  .left-group h1 {
    font-size: 1.6rem;
  }

  .right-group nav {
    gap: 15px;
  }

  .right-group nav a {
    font-size: 15px;
  }
}

/* Mobile: Up to 767px */
@media (max-width: 767px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .left-group {
    flex-direction: row; /* Keep logo and title in row on mobile */
    margin-bottom: 15px;
    width: 100%;
    justify-content: space-between;
  }

  .left-group img {
    max-height: 40px;
  }

  .left-group h1 {
    font-size: 1.4rem;
  }

  .right-group {
    width: 100%;
    margin-left: 0;
  }

  .right-group nav {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .right-group nav a {
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
  }

  .right-group nav a:last-child {
    border-bottom: none;
  }

  .right-group nav a::after {
    display: none; /* Hide underline effect on mobile */
  }
}