/* =============================
   HEADER BASE STYLES
============================= */

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd; /* ✅ light gray thin line */
  padding: 16px 0;
}

.nav-wrapper {
  display: flex;
  justify-content: flex-end; /* ✅ Push nav to the right */
  align-items: center;
  border-top: 1px solid #ddd;
}

.logo a {
  font-size: 22px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
}
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}
/* Header main section with logos */
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between; /* key: splits left & right */
  padding: 16px 0;
  border-bottom: 1px solid #ddd;
  gap: 20px;
  flex-wrap: wrap;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.toggle-div {
  display: none;
}

.toggle-div a {
  color: var(--metu-red);
  padding: 14px 16px;
  text-decoration: none;
  font-size: 24px;
  display: block;
}

.toggle-div a.icon {
  background: transparent;
}

.toggle-div a:hover {
  background-color: var(--metu-red);
  color: white;
  border-radius: 4px;
}

.header-logo {
  height: 48px;
  width: auto;
}

.logo-separator {
  height: 48px;
  width: 2px;
  background-color: #888;
}

.header-title h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
   color: var(--metu-red); /* ✅ Use the defined METU red variable */
}

.header-title h2 {
  font-size: 0.95rem;
  font-weight: 400;
  margin: 0;
  color: #555;
}

/* =============================
   NAVIGATION
============================= */

.main-nav {
  display: flex;
  justify-content: flex-end; /* ✅ Align inner items to the right */
  width: 100%;
  font-size: 16pt;
  font-weight: 600;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  color: var(--metu-red);
  padding: 8px 10px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  display: inline-block;
}

.nav-list > li > a:hover {
  background-color: var(--metu-red);
  color: white;
}
.nav-title {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--metu-red);
  cursor: default;
  user-select: none;
}



/* =============================
   TOP OVERHEADER BAR
============================= */
.top-overheader {
  background-color: #262626;
  color: #ffffff;
  font-size: 16pt;
  font-weight: 600;
  padding: 4px 0;
  margin: 0; /* ✅ Ensure no margin */
}

.top-overheader .container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-end; /* 👈 aligns content to the right */
  align-items: center;
}

.overheader-right a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.overheader-right a:hover {
  text-decoration: underline;
}


/* ========   MEGA DROPDOWN  =========== */

  .nav-list > li.has-mega:hover .mega-dropdown {
    display: flex;
  }

  .mega-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px 30px;
    z-index: 100;
    width: 720px;
    justify-content: space-between;
    gap: 20px;
    left: 50%;                    /* ✅ center relative to window */
    transform: translateX(-50%);  /* ✅ shift back half width */
    width: 900px;
    max-width: 100vw;
    font-size: 16pt;
    font-weight: 600;
  }

  .dropdown-column {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .dropdown-column h4 {
    /* font-size: 15px; */
    margin-bottom: 8px;
    color: var(--metu-red);
    font-weight: 600;
  }

  .dropdown-column a {
    margin-bottom: 6px;
    /* font-size: 14px; */
    color: #333;
    transition: color 0.2s ease;
  }

  .dropdown-column a:hover {
    color: var(--metu-red);
  }

.external-icon {
  width: 1em;
  height: 1em;
  margin-left: 0.4em;
  vertical-align: text-bottom;
  display: inline-block;
  object-fit: contain;      /* Ensures scaling within container */
}

/* =============================
   SIMPLE DROPDOWNS
============================= */

.nav-list > li > ul.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 10;
  min-width: 160px;
  padding: 8px 0;
}

.nav-list > li:hover > ul.dropdown {
  display: block;
}

.dropdown li {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 8px 12px;
  color: #333;
  font-size: 14px;
}

.dropdown li a:hover {
  background-color: #f5f5f5;
}




/* Show toggle button on mobile */
@media (max-width: 768px) {
  .toggle-div {
    display: block;
  }
  .header-title{
    display: none;
  }

  .nav-wrapper{
    font-size: 12pt;
  }
}
