header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: #fff; /* or whatever you use */
}

.logo-container {
  display: flex;
  align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;          /* space between logo and text */
    text-decoration: none;
    color: inherit;     /* keeps your header color */
}

.brand-link:hover {
    opacity: 0.8;       /* optional hover effect */
}

.logo {
    height: 40px;   /* adjust size */
    width: auto;
    display: block;
}
/* ============================================
   BASE NAVBAR
============================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: white;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: relative; /* anchor floating menus */
  z-index: 10;
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Direct links */
.nav-links > a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
}

.nav-links > a:hover {
  text-decoration: underline;
}


/* ============================================
   DROPDOWN (DESKTOP)
============================================ */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;   /* exactly under parent */
  left: 0;
  min-width: 200px;

  background: white;
  padding: 8px 0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);

  display: none;
  z-index: 9999;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #2563eb;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: #eef4ff;
}

/* Show dropdown on hover (DESKTOP ONLY) */
@media (min-width: 801px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}


/* ============================================
   HAMBURGER (MOBILE)
============================================ */
.hamburger {
  display: none;
  font-size: 1.9rem;
  cursor: pointer;
  padding: 5px 10px;
}


/* ============================================
   MOBILE MENU BEHAVIOR
============================================ */
@media (max-width: 800px) {

  /* Show hamburger */
  .hamburger {
    display: block;
  }

  /* Hide nav-links by default */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;

    background: white;
    border-radius: 12px;
    padding: 12px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);

    flex-direction: column;
    gap: 0;
    display: none;
  }

  /* Show nav-links when active */
  .nav-links.active {
    display: flex;
  }

  /* Full-width dropdown items */
  .dropdown {
    width: 100%;
  }

  .dropdown-toggle {
    width: 100%;
    padding: 12px 15px;
  }

  /* Dropdown must STILL FLOAT on mobile */
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-radius: 8px;
    margin-top: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: none;
  }

  /* Keep hover trigger for now */
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}


/* ============================================
   BASE PAGE STYLING
============================================ */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  background: #f5f5f5;
}

h1 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 1.5rem;
}


/* ============================================
   CARD
============================================ */
.card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
}


/* ============================================
   FORM
============================================ */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 20px;
  row-gap: 15px;
}

.field {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

label {
  font-size: 0.9rem;
  color: #333;
}

input, select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}


/* ============================================
   BUTTON
============================================ */
button {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 0.8rem;
}

button.primary {
  background: #2563eb;
  color: white;
}

button.primary:hover {
  opacity: 0.9;
}


/* ============================================
   RESULT TABLE
============================================ */
.result-box {
  margin-top: 1rem;
  font-weight: 500;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.4rem 0.5rem;
  text-align: center;
}

th {
  background: #f0f0f0;
}

tr:nth-child(even) td {
  background: #fafafa;
}

.note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  table {
    font-size: 0.8rem;
  }
}


/* ============================================
   FOOTER
============================================ */
.footer {
  text-align: center;
  font-size: 0.85rem;
  color: #555;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #ddd;
}

.footer a {
  color: #2563eb;
  text-decoration: none;
  margin: 0 8px;
}

.footer a:hover {
  text-decoration: underline;
}
