:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-700: #374151;
  --gray-900: #111827;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --border-color: #b5b5b5;
  --border-color-dark: #333;
}

* {
  margin: 0;
  padding: 0;
  text-decoration: none;
  box-sizing: border-box;
}

@font-face {
  font-family: "Oxygen-Regular";
  src: url("../fonts/Oxygen-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html,
body {
  height: 100%;
  margin: 0;
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
}

#container {
  height: calc(100%);
  display: flex;
  flex-direction: column;
  background-position: center;
  background-size: cover;
  position: relative;
  z-index: 10;
}

#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  vertical-align: top;
  padding: 5px;
  position: relative;
  margin-top: 40px;
  z-index: 20;
}

.main {
  justify-content: center !important;
}

.form img {
  width: 100px;
}

/* Text Content */
.text {
  max-width: 675px;
  margin: 0 auto;
  padding: 1.5rem;
  animation: fadeIn 0.5s ease-out;
}

.text header {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.text p {
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-align: justify;
  text-indent: 2.7rem;
}

.text p span {
  color: var(--primary);
  font-weight: 500;
}

/* Navigation - Modified for sliding behavior */
.menuheader {
  position: fixed;
  width: 100%;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 100;
  transition: var(--transition-normal);
  height: 40px;
}

.menuheader.scrolled {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

/* Navigation container that slides */
.nav-container {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Main navigation */
.logo-text {
  color: var(--primary);
  padding: 0 10px;
  margin: 0 0 0 7px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 40px;
  padding: 0 10px;
  text-wrap: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #22c55e;
  font-weight: 500;
  margin-left: auto;
}

h1 {
  font-size: 30px;
  text-align: center;
  color: var(--primary);
}

.logo h1 {
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 20ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu {
  display: flex;
  gap: 0;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li button {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  padding: 5px 10px;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-wrap: nowrap;
  gap: 0.5rem;
}

.menu li button:hover {
  background-color: rgba(59, 131, 246, 0.15);
  text-decoration: none;
}

/* Schedule arrow indicator */
.schedule-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s;
}

/* Schedule navigation bar */
.schedule-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 40px;
  padding: 0 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.schedule-menu {
  display: flex;
  gap: 0;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-menu li {
  display: flex;
}

.schedule-menu li a {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  color: var(--primary);
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-wrap: nowrap;
}

.schedule-menu li a:hover,
.schedule-menu li button:hover {
  background-color: rgba(59, 131, 246, 0.15);
  text-decoration: none;
}

.close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-weight: bold;
  cursor: pointer;
}

/* Status Indicators */
.include {
  width: 100%;
  height: 0px;
  margin: 0;
}

.connection-status {
  background-color: #00b300;
  color: #00b300;
  display: block;
  font-size: 2px;
}

.error-status {
  background-color: red;
  color: red;
  display: block;
  font-size: 2px;
}

/* Footer */
#footer-container {
  width: 100%;
  margin-top: auto;
  border-top: 1px solid rgb(184, 184, 184);
}

#footer-content {
  padding: 20px;
  text-align: center;
  background-color: transparent;
}

.footer-text {
  color: #2e7eff;

  line-height: 1.2;
}

/* Background Image */
.background-image-item {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.1;
  transition: opacity var(--transition-slow);
}

/* Content Transitions */
.hidden-content {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: opacity var(--transition-normal),
    max-height var(--transition-normal), transform var(--transition-normal);
}

.visible-content {
  opacity: 1;
  max-height: 800px;
  transform: translateY(0);
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hamburger Menu */
.hamburger,
.hamburgersub {
  position: fixed;
  top: 0px;
  right: 10px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 9999;
  background-color: transparent;
  border-radius: 5px;
}

.hamburger-line {
  width: 30px;
  height: 2.5px;
  border-radius: 1px;
  background-color: #2563eb;
  margin: 4px 0;
  transition: transform 0.5s ease;
}

.close-icon .hamburger-line:nth-child(1) {
  transform: translateY(10px);
  width: 20px;
  height: 3px;
  border-radius: 5px;
}

.close-icon .hamburger-line:nth-child(2) {
  opacity: 1;
  width: 20px;
  height: 3px;
}

.close-icon .hamburger-line:nth-child(3) {
  transform: translateY(-10px);
  width: 20px;
  height: 3px;
  border-radius: 5px;
}

/* Dropdown menu - moved outside menuheader */
.dropdown-menu {
  position: fixed;
  top: 45px;
  right: 20px;
  width: max-content;
  background-color: hsl(0, 0%, 100%, 0.95);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 500;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000; /* Reduced z-index since it's now outside stacking context */
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-normal),
    transform var(--transition-normal),
    visibility 0s linear var(--transition-normal);
}

.dropdown-menu p {
  margin: 10px 0px 5px 10px;
}

.dropdown-menu .line-seperator {
  padding: 0;
  margin: 5px 0;
  height: 2px;
  width: 140px;
  align-self: center;
  background-color: #8a8a8a;
}

.dropdown-menu a {
  text-align: left;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  align-items: center;
}

.dropdown-menu a:hover {
  color: var(--primary-dark);
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dropdown-menu.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--transition-normal),
    transform var(--transition-normal), visibility 0s;
  overflow: auto;
  max-height: calc(100vh - 80px);
}

@supports (backdrop-filter: blur(10px)) {
  .menuheader {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 480px) {
  .menuheader {
    min-height: 40px;
  }

  .nav-right {
    display: none;
  }

  .hamburger,
  .hamburgersub {
    display: flex;
  }
}

/* Active page highlight styles */
.active-page {
  background-color: var(--primary-light) !important;
  color: white !important;
}

.dropdown-menu a.active-page {
  background-color: var(--primary-light);
  color: white;
}

/* Make dropdown arrow white when schedule button is active */
.active-page .dropdown-arrow {
  color: white !important;
}

.spacer {
  font-size: 0.75em;
  margin: 2px 5px 4px 5px;
}

.alt-gap {
  padding: 5px;
}

.last-change-info {
  font-size: 12px;
  padding-bottom: 5px;
}

/* Mobile schedule section */
.mobile-sch-section {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-sch-label {
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-sch-tab {
  display: block;
  padding: 8px 16px 8px 24px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;

  transition: var(--transition-fast);
}

.mobile-sch-tab:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.mobile-sch-tab.active-page {
  background-color: var(--primary-light);
  color: white;
}

/* Login dropdown styles */
.login-dropdown {
  position: relative;
  display: inline-block;
}

.login-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-weight: 500;
}

.dropdown-arrow {
  border: none;
  font-size: 13px;
  transition: transform 0.3s;
  transform: scaleX(1.5);
}

.upward-arrow {
  color: #1557b0;
  border: none;
  padding: 0.4rem;
  background-color: transparent;
  font-size: 13px;
  transition: transform 0.3s;
  transform: rotate(180deg) scaleX(1.5);
}

.login-dropdown-toggle.active .dropdown-arrow {
  transform: rotate(180deg) scaleX(1.5);
}

.login-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  z-index: 99999;
  top: 40px;
  width: max-content;
  background-color: hsl(0, 0%, 100%, 0.95);
  color: var(--primary);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 500;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.login-dropdown-menu a {
  justify-content: left;
  width: 100%;
}

.login-dropdown-menu.show {
  display: block;
  z-index: 99999;
}

.login-option {
  display: block;
  padding: 5px 10px;

  color: #1a73e8;
  text-decoration: none;
  transition: background-color 0.2s;
}

.login-option:hover {
  background-color: #f5f5f5;
  color: #1557b0;
}

/* for login */
.existing-session-box {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.session-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.session-actions button {
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.schedule-dropdown {
  position: relative;
  display: inline-block;
}

.schedule-dropdown-menu {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  top: 100%;
  left: 0;
}

.schedule-dropdown-menu.show {
  display: block;
}

.schedule-dropdown-option {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: black;
}

.schedule-dropdown-option:hover {
  background-color: #f1f1f1;
}

.schedule-dropdown-option.active-page {
  background-color: #4caf50;
  color: white;
}

/* Add rotation for schedule dropdown arrow when active */
.schedule-toggle-btn.active .dropdown-arrow {
  transform: rotate(180deg) scaleX(1.5);
}

/* Mobile schedule dropdown styles - make vertical */
.schedule-dropdown-mobile {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.schedule-toggle-btn-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 10px;
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.schedule-toggle-btn-mobile.active {
  background-color: var(--primary-light);
  color: white !important;
}

.schedule-toggle-btn-mobile.active .dropdown-arrow {
  color: white !important;
}

.schedule-dropdown-menu-mobile {
  display: none;
  flex-direction: column;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--primary-light);
  border-top: 1px solid var(--primary-light);
}

.schedule-dropdown-menu-mobile.show {
  display: flex;
}

/* Ensure the dropdown arrow rotates for mobile schedule dropdown */
.schedule-toggle-btn-mobile.dropdown-active .dropdown-arrow {
  transform: rotate(180deg) scaleX(1.5);
}

.schedule-dropdown-menu-mobile a {
  display: block;
  padding: 4px 10px 4px 1rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-fast);
}

.schedule-dropdown-menu-mobile a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.schedule-dropdown-menu-mobile a.active-page {
  border: 2px solid var(--primary-light) !important;
  background-color: transparent !important;
  color: var(--primary) !important;
}

.schedule-dropdown-menu-mobile a:last-child {
  border-bottom: none;
}

.dropdown-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gray-700);
}

