/* Page Header - Rebelle Logo + Title + Navigation
 * Based on original Display_Results.php design
 */

/* Top blue bar */
.top-bar {
  width: 100%;
  height: 36px;
  background: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
}

.top-bar-text {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--weight-regular);
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0px;
  line-height: 1;
  margin: 0;
}

.page-header {
  width: 100%;
  height: 202px;
  background: #FFFFFF;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  position: relative;
}

/* Rebelle logo - left side, top aligned */
.page-header-logo {
  position: absolute;
  left: 0px;
  top: 0px;
}

.page-header-logo img {
  width: 178px;
  height: 201px;
  object-fit: contain;
}

/* Page title - centered */
.page-header-title {
  text-align: center;
  padding-top: 30px;
  padding-bottom: 15px;
}

.page-header-title h1 {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1;
}

.page-header-title h1 .rally-text {
  color: var(--color-primary);
  
}

/* Navigation (now inside header) */
.page-nav {
  width: 100%;
  max-width: 550px;
  background: #FFFFFF;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  flex: 1;
}

/* Class selector - top of nav */
.class-selector {
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.class-selector button {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  padding: 4px 30px;
  height: 36px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #E5E5E5;
  color: var(--color-navy);
  border: 1px solid #CCCCCC;
}

.class-selector button:hover {
  background: #D0D0D0;
}

.class-selector button.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.page-nav-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 34px;
  height: 34px;
}

.page-nav-list li {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-nav-list li:not(:last-child)::after {
  content: '|';
  color: var(--color-navy);
  margin: 0px 7px;
  font-weight: var(--weight-regular);
  font-size: 20px;
}

.page-nav-list a {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: -0.2px;
  color: var(--color-navy);
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-nav-list a:hover {
  color: var(--color-primary);
}

.page-nav-list a.active {
  color: var(--color-primary);
}

/* Day selector dropdown */
.day-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-selector select {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: -0.2px;
  color: var(--color-navy);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.2s ease;
}

.day-selector select:hover {
  color: var(--color-primary);
}

.day-selector::after {
  content: '▼';
  color: var(--color-navy);
  pointer-events: none;
  font-size: 10px;
}

/* Responsive: Mobile */
@media (max-width: 768px) {
  /* Theme toggle on left, rally text on right */
  .top-bar {
    justify-content: flex-start !important;
    height: 130px;
  }

  .top-bar-text {
    margin-left: auto;
  }

  .page-header {
    flex-direction: column;
    padding: 10px 15px;
    gap: 8px;
    height: auto;
  }

  .page-header-logo {
    position: static;
    text-align: center;
    margin: 0 auto;
  }

  .page-header-logo img {
    height: 100px;
    width: auto;
  }

  .page-header-title {
    padding-top: 0;
    padding-bottom: 8px;
  }

  .page-header-title h1 {
    font-size: 24px;
    letter-spacing: 0px;
    line-height: 1.1;
  }

  .class-selector {
    width: 100%;
    justify-content: center;
    max-width: 450px;
  }


  .page-nav {
    padding: 0;
    max-width: 100%;
  }

  .page-nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 8px 0;
  }

  .page-nav-list a,
  .day-selector select {
    font-size: 16px;
    padding: 12px 0px;
    letter-spacing: -0.3px;
  }

  .page-nav-list li:not(:last-child)::after {
    font-size: 16px;
    margin: 0 6px;
  }

  .day-selector::after {
    font-size: 8px;
  }
}

/* Responsive: Small Mobile - more compact nav */
@media (max-width: 480px) {
  .page-header {
    padding: 8px 10px;
  }

  .page-header-logo img {
    height: 80px;
  }

  .page-header-title h1 {
    font-size: 20px;
  }

  .top-bar-text {
    font-size: 10px;
  }

  .class-selector button {
    font-size: 14px;
    padding: 4px 20px;
    height: 32px;
  }

  .page-nav-list {
    gap: 0px;
    margin: 6px 0;
    max-height: none;
    height: auto;
  }

  .page-nav-list a,
  .day-selector select {
    font-size: 14px;
    padding: 12px 0px;
    letter-spacing: -0.6px;
  }

  .page-nav-list li:not(:last-child)::after {
    font-size: 13px;
    margin: 0 4px;
  }

  .day-selector::after {
    font-size: 7px;
  }
}

/* Responsive: Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .page-header-logo img {
    width: 150px;
    height: 170px;
  }

  .page-header-title h1 {
    font-size: 46px;
  }
}

/* Responsive: Small Tablet - scale logo with viewport */
@media (min-width: 769px) and (max-width: 920px) {
  .page-header-logo img {
    width: min(15vw, 120px);
    height: auto;
    max-height: 170px;
  }

  .page-header-title h1 {
    font-size: 40px;
  }
}
